-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
78 lines (60 loc) · 2.77 KB
/
Dockerfile
File metadata and controls
78 lines (60 loc) · 2.77 KB
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
# This Dockerfile assembles a headless vnc image based on Scientific Linux 7
FROM scientificlinux/sl:7
MAINTAINER Pengfei Ding "dingpf@fnal.gov"
ENV REFRESHED_AT 2022-04-28
RUN yum clean all \
&& yum -y install epel-release \
&& yum -y update \
&& yum -y install yum-plugin-priorities \
subversion asciidoc bzip2-devel \
fontconfig-devel freetype-devel gdbm-devel glibc-devel \
ncurses-devel openssl-devel openldap-devel readline-devel \
autoconf automake libtool swig texinfo tcl-devel tk-devel \
xz-devel xmlto zlib-devel libcurl-devel libjpeg-turbo-devel \
libpng-devel libstdc++-devel libuuid-devel libX11-devel \
libXext-devel libXft-devel libXi-devel libXrender-devel \
libXt-devel libXpm-devel libXmu-devel mesa-libGL-devel \
perl-DBD-SQLite perl-ExtUtils-MakeMaker \
gcc gcc-c++ libgcc.i686 glibc-devel.i686 libstdc++.i686 libffi-devel \
&& yum -y install nc perl expat-devel gdb time tar \
zip xz bzip2 patch sudo gstreamer gtk2-devel xterm \
openssh-clients rsync tmux svn sed cmake \
gstreamer-plugins-base-devel \
vim which net-tools xorg-x11-fonts* \
xorg-x11-server-utils xorg-x11-twm dbus dbus-x11 \
libuuid-devel openssh-server evince eog emacs htop \
libconfuse-devel xvfb nss_wrapper gettext unzip krb5-workstation \
subversion-perl pcre2 redhat-lsb-core python-six \
xxhash-libs libzstd \
&& yum clean all
RUN yum clean all \
&& yum install -y https://repo.opensciencegrid.org/osg/3.6/osg-3.6-el7-release-latest.rpm \
&& yum -y update \
&& yum --enablerepo=epel -y install osg-wn-client \
&& yum clean all
RUN wget -O /etc/krb5.conf https://authentication.fnal.gov/krb5conf/SL7/krb5.conf
ENV UPS_OVERRIDE="-H Linux64bit+3.10-2.17"
# Fix SSH Config
RUN echo -e '\tProtocol 2' >> /etc/ssh/ssh_config
RUN echo -e '\tGSSAPIDelegateCredentials yes' >> /etc/ssh/ssh_config
RUN echo -e '\tGSSAPIKeyExchange yes' >> /etc/ssh/ssh_config
RUN echo -e '\tForwardX11 yes' >> /etc/ssh/ssh_config
RUN echo 'Host 131.225.* *.fnal.gov *soudan.org' >> /etc/ssh/ssh_config
RUN echo -e '\tProtocol 2' >> /etc/ssh/ssh_config
RUN echo -e '\tGSSAPIAuthentication yes' >> /etc/ssh/ssh_config
RUN echo -e '\tGSSAPIDelegateCredentials yes' >> /etc/ssh/ssh_config
RUN echo -e '\tGSSAPIKeyExchange yes' >> /etc/ssh/ssh_config
RUN echo -e '\tForwardX11Trusted yes' >> /etc/ssh/ssh_config
RUN echo -e '\tForwardX11 yes' >> /etc/ssh/ssh_config
RUN dbus-uuidgen > /var/lib/dbus/machine-id
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
# Create a me user (UID and GID should match the Mac user), add to suoders, and switch to it
ENV USERNAME=me
ARG MYUID
ENV MYUID=${MYUID:-1000}
ARG MYGID
ENV MYGID=${MYGID:-100}
RUN useradd -u $MYUID -g $MYGID -ms /bin/bash $USERNAME && \
echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER $USERNAME
ENTRYPOINT ["/bin/bash"]