Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
marcdegraef committed Dec 13, 2023
1 parent 227c2b4 commit 2585851
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG DEBIAN_FRONTEND=noninteractive
RUN cd ~/EMs \
&& git clone https://github.com/EMsoft-org/EMsoftData.git \
&& git clone https://github.com/EMsoft-org/EMsoft.git \
&& mkdir EMPlay && mkdir EMsoftBuild && mkdir EMXtal
&& mkdir EMsoftBuild

RUN cd ~/EMs/EMsoftBuild/ && mkdir Debug Release && cd Debug \
&& cmake -DCMAKE_BUILD_TYPE=Debug -DEMsoft_SDK=/opt/EMsoft_SDK -DBUILD_SHARED_LIBS=OFF \
Expand All @@ -23,6 +23,24 @@ ENV PATH ~/EMs/EMsoftBuild/Release/Bin:$PATH
# add backup path of EMsoft
ENV EMSOFTPATHNAME ~/EMs/EMsoft

# run terminal for user at /home/
WORKDIR /home/
# install a new user
ARG user=EMuser
ARG uid=501
ARG gid=3000

# Add new user with our credentials
ENV USERNAME ${user}
RUN useradd -m $USERNAME && \
echo "$USERNAME:$USERNAME" | chpasswd && \
usermod --shell /bin/bash $USERNAME && \
usermod --uid ${uid} $USERNAME && \
groupmod --gid ${gid} $USERNAME

USER ${user}

# create a home folder
RUN mkdir /home/${user}

# run terminal for EMuser at /home/${user}
WORKDIR /home/${user}
CMD ["/bin/bash"]

0 comments on commit 2585851

Please sign in to comment.