Add Dockerfile
This commit is contained in:
49
Dockerfile
Normal file
49
Dockerfile
Normal file
@@ -0,0 +1,49 @@
|
||||
FROM ubuntu:19.10
|
||||
|
||||
# Disable tzdata interactive configuration
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get dist-upgrade -y && \
|
||||
apt-get install -y sudo
|
||||
|
||||
# X Forwarding
|
||||
# Replace 1000 with your user / group id (and down below)
|
||||
RUN export uid=1000 gid=1000 && \
|
||||
mkdir -p /home/user && \
|
||||
echo "user:x:${uid}:${gid}:Developer,,,:/home/user:/bin/bash" >> /etc/passwd && \
|
||||
echo "user:x:${uid}:" >> /etc/group && \
|
||||
echo "user ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/user && \
|
||||
chmod 0440 /etc/sudoers.d/user
|
||||
|
||||
# Copy installation files & license
|
||||
COPY AM_CAT_Dymola.AllLinux/1/linux_x86_64 /home/user/dymola-rpms
|
||||
COPY Dymola.LIC /home/user/
|
||||
|
||||
# This package is used to convert from rpm to deb
|
||||
RUN apt-get install -y alien
|
||||
|
||||
# Convert rpm package to deb
|
||||
RUN cd /home/user/dymola-rpms && \
|
||||
alien -ik dymola-2018.1-1.x86_64.rpm && \
|
||||
ls
|
||||
|
||||
# Dependencies not automatically installed
|
||||
RUN apt-get install -y software-properties-common && \
|
||||
add-apt-repository -y ppa:linuxuprising/libpng12 && \
|
||||
apt-get update && \
|
||||
apt-get install -y libjpeg62 libpng12-0 libglu1-mesa libxkbcommon0
|
||||
|
||||
# Invalidate dymola's shipped libstdc++ version
|
||||
RUN mv /opt/dymola-2018-x86_64/bin/lib64/libstdc++.so.6.0.20 /opt/dymola-2018-x86_64/bin/lib64/libstdc++.so.6.0.20.bak
|
||||
|
||||
# A console is better than no console!
|
||||
RUN apt-get install -y xterm
|
||||
|
||||
# Own local files to user to avoid permissions problems
|
||||
RUN chown -R user:user /home/user
|
||||
|
||||
USER user
|
||||
ENV HOME /home/user
|
||||
WORKDIR /home/user
|
||||
CMD ["xterm"]
|
||||
Reference in New Issue
Block a user