Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
docker/Dockerfile.ubuntu
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
75 lines (52 sloc)
2.1 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu | |
# Edit to change username, UID & GID, user password for the container (optional) | |
ARG user="user123" | |
ARG uid=5555 | |
ARG gid=5555 | |
ARG pass=qwerty | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update \ | |
&& DEBIAN_FRONTEND=noninteractive apt-get install xfce4 wget build-essential cmake nano mc xfce4-terminal xterm bzip2 tar sudo git -y | |
RUN wget https://deac-fra.dl.sourceforge.net/project/turbovnc/3.0/turbovnc_3.0_amd64.deb | |
RUN dpkg -i turbovnc_3.0_amd64.deb | |
RUN rm -fr /usr/bin/xfce4-screensaver | |
RUN touch /usr/bin/xfce4-screensaver | |
RUN chmod +x /usr/bin/xfce4-screensaver | |
# add a user | |
RUN groupadd -g $gid $user | |
RUN useradd -u $uid -g $gid $user | |
RUN mkdir -p /home/$user/.vnc | |
RUN echo $(echo $pass | /opt/TurboVNC/bin/vncpasswd -f) > /home/$user/.vnc/passwd | |
RUN chown -R $user:$user /home/$user | |
RUN chmod 600 /home/$user/.vnc/passwd | |
RUN usermod -aG sudo $user | |
RUN usermod -s /bin/bash $user | |
RUN echo $user:$pass | chpasswd | |
# let's include seamonkey browser | |
RUN wget -c https://archive.mozilla.org/pub/seamonkey/releases/2.53.12/linux-x86_64/en-GB/seamonkey-2.53.12.en-GB.linux-x86_64.tar.bz2 -O /opt/seamonkey.tar.bz2 | |
WORKDIR "/opt/" | |
RUN tar -xvf seamonkey.tar.bz2 | |
RUN rm -f /opt/seamonkey.tar.bz2 | |
WORKDIR "/" | |
RUN mkdir -p /home/$user/Desktop | |
RUN echo "[Desktop Entry]\n \ | |
Version=1.0\n \ | |
Type=Application\n \ | |
Name=Seamonkey\n \ | |
Comment=Web Browser\n \ | |
Exec=/opt/seamonkey/seamonkey\n \ | |
Icon=web-browser\n \ | |
Terminal=false" > /home/$user/Desktop/Seamonkey.desktop | |
RUN chmod +x /home/$user/Desktop/Seamonkey.desktop | |
# add vnc server as a startup executable | |
RUN echo "su $user -c'/opt/TurboVNC/bin/vncserver -fg :1'" > /bin/start.sh | |
RUN cat /bin/start.sh | |
RUN chmod +x /bin/start.sh | |
EXPOSE 5901 | |
# startup exe: | |
CMD /bin/start.sh | |
################### | |
# build by running in the folder with this Dockerfile: "docker build . -t dockerhubuser/ubuntu_desktop_xfce" | |
# optionally upload to dockerhub: "docker push dockerhubuser/ubuntu_desktop_xfce:latest" | |
# then launch image in a container as "docker run -ti -p 5901:5901 dockerhubuser/ubuntu_desktop_xfce" | |
# then connect to it in TurboVNC: "vncviewer localhost:1" | |