Skip to content

Commit

Permalink
fix Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Sep 27, 2023
1 parent af1af31 commit c410866
Show file tree
Hide file tree
Showing 6 changed files with 127 additions and 131 deletions.
68 changes: 68 additions & 0 deletions .devcontainer/.bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
################################################################################
# epics-containers developer shell configuration.
# This is a standard ubuntu .bashrc plus a call to .bashrc_dev_container
# in the user's home directory on the host machine.
################################################################################

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'

alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi

# add user's custom .bashrc_dev_container
if [ -f ~/.bashrc_dev_container ]; then
. ~/.bashrc_dev_container
fi
47 changes: 47 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// For format details, see https://containers.dev/implementors/json_reference/
{
"name": "epics-containers IOC devcontainer",
"build": {
"dockerfile": "../Dockerfile",
"target": "developer",
"args": {
"TARGET_ARCHITECTURE": "linux"
}
},
"remoteEnv": {
"DISPLAY": "${localEnv:DISPLAY}",
"PROJECT_NAME": "${localWorkspaceFolderBasename}"
},
"customizations": {
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.vscode-pylance",
"tamasfe.even-better-toml",
"redhat.vscode-yaml",
"ryanluker.vscode-coverage-gutters",
"epicsdeb.vscode-epics",
"ms-python.black-formatter"
]
},
"settings": {
// global python venv created in epics-base
"python.defaultInterpreterPath": "/venv/bin/python"
}
},
// Make sure the files we are mapping into the container exist on the host
"initializeCommand": "bash .devcontainer/initializeCommand ${devcontainerId}",
"runArgs": [
"--net=host",
"--security-opt=label=disable"
],
"mounts": [
// Mount some useful local files from the user's home directory
"source=${localEnv:HOME}/.bash_eternal_history,target=/root/.bash_eternal_history,type=bind",
"source=${localWorkspaceFolder}/.devcontainer/.bashrc,target=/root/.bashrc,type=bind",
"source=${localEnv:HOME}/.bashrc_dev_container,target=/root/.bashrc_dev_container,type=bind",
"source=${localEnv:HOME}/.gitconfig,target=/root/.gitconfig,type=bind",
"source=${localEnv:HOME}/.inputrc,target=/root/.inputrc,type=bind",
"source=${localEnv:HOME}/.ssh,target=/root/.ssh,type=bind"
]
}
10 changes: 10 additions & 0 deletions .devcontainer/initializeCommand
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# make sure all the files we mount into the container exist
for i in .bash_eternal_history .bashrc_dev_container .inputrc .gitconfig; do
if [ ! -f $HOME/$i ] ; then
touch $HOME/$i;
fi
done

echo "devcontainerID ${1}"
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ RUN busy/install.sh R1-7-3
COPY ibek-support/ADCore/ ADCore/
RUN ADCore/install.sh R3-12-1

COPY ibek-support/ADAravis/ ADAravis/
RUN ADAravis/install.sh R2-3
# COPY ibek-support/ADAravis/ ADAravis/
# RUN ADAravis/install.sh R2-3

# Make the IOC
RUN ibek ioc generate-makefile
Expand Down
15 changes: 0 additions & 15 deletions ctools/README.md

This file was deleted.

114 changes: 0 additions & 114 deletions ctools/telnet3.py

This file was deleted.

0 comments on commit c410866

Please sign in to comment.