-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
91 lines (67 loc) · 2.49 KB
/
Dockerfile.dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
FROM sdp-docker-registry.kat.ac.za:5000/katsdpcontim
MAINTAINER sperkins@ska.ac.za
# Switch to root for package install
USER root
ENV DEBIAN_FRONTEND noninteractive
ENV PACKAGES \
xfce4 \
tightvncserver \
vim \
git \
cvs \
subversion \
rsync \
xterm
# Update, upgrade and install packages
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y $PACKAGES && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install a working parseltongue
RUN add-apt-repository -y ppa:kettenis-w/parseltongue
RUN apt-get -y update
RUN apt-get -y install parseltongue
ENV AIPS_BASE_PATH /home/kat/AIPS
ENV AIPS_DATA_PATH /home/kat/AIPS/DATA
# Add services required by AIPS
# This is based on 16.04 /etc/services
ADD services.append /tmp/services.append
RUN cat /tmp/services.append >> /etc/services && \
rm -f /tmp/services.append
RUN mkdir -p $AIPS_BASE_PATH
RUN mkdir -p $AIPS_DATA_PATH
WORKDIR $AIPS_BASE_PATH
RUN curl ftp://ftp.aoc.nrao.edu/pub/software/aips/31DEC19/install.pl -O
# Remove root user check:
RUN sed -i -e '455,461d' install.pl
## INSTALL AIPS - the here string just cycles through the aips install menu with (mostly) defaults.
#RUN ["/bin/bash","-c","aipscmd=$'\root\n\nSKACOMM\nY\n\n\n/home/kat/AIPS/DATA/LOCALHOST_1\n\n\n\n\n\n\n\n\n\n\n' && perl install.pl -n <<< \"$aipscmd\""]
RUN ["/bin/bash","-c","aipscmd=$'\root\n\nSKACOMM\nY\n\n\n\n\n\n\n\n\n\n\n\n\n\n' && perl install.pl -n <<< \"$aipscmd\""]
# Add run script and make it executable
ADD run.sh /run.sh
RUN chmod uog+x /run.sh
# Add obit setup and aips login to bashrc
RUN touch /root/.bashrc && \
echo ". $AIPS_BASE_PATH/LOGIN.SH" >> /root/.bashrc
# Add Xdefaults
ADD Xdefaults /root/.Xdefaults
RUN echo "xrdb -merge $HOME/.Xdefaults" >> /root/.bashrc
# Add tightvncserver startup script
ADD xstartup /root/.vnc/xstartup
RUN chmod og-rwx,u+rwx /root/.vnc/xstartup
# Set tightvncserver password
RUN echo 'obitsky' | vncpasswd -f > /root/.vnc/passwd && \
chmod og-rwx /root/.vnc/passwd
# Saner xfce4 keyboard settings
ADD xfce4-keyboard-shortcuts.xml /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
# Allow X Forwarding over ssh
ADD ssh_config /etc/ssh/ssh_config
# Ensure everything under /home/kat belongs to root
RUN chown -R root:root /home/kat
# Configure Obit/AIPS disks
RUN cfg_aips_disks.py
# Set the work directory to /obitconf
WORKDIR /obitconf
# Run run.sh and then go to interactive shell
CMD ["/bin/bash", "--rcfile", "/run.sh", "-i"]