Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
marcdegraef authored Dec 13, 2023
1 parent 992b49f commit 7bee87e
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 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/EMsoftOO.git \
&& mkdir EMPlay && mkdir EMsoftOOBuild && mkdir EMXtal
&& mkdir EMsoftOOBuild

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

# 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}

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

0 comments on commit 7bee87e

Please sign in to comment.