Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
marcdegraef authored Dec 15, 2023
1 parent 9445fdc commit cd766ca
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ ARG TARGETARCH
ARG DEBIAN_FRONTEND=noninteractive

# clone EMsoft and set up SDK Debug/Release
RUN cd ~/EMs \
RUN cd /home/EMs \
&& git clone https://github.com/EMsoft-org/EMsoftData.git \
&& git clone https://github.com/EMsoft-org/EMsoftOO.git \
&& mkdir EMsoftOOBuild

RUN cd ~/EMs/EMsoftOOBuild/ && mkdir Debug Release && cd Debug \
RUN cd /home/EMs/EMsoftOOBuild/ && mkdir Debug Release && cd Debug \
&& cmake -DCMAKE_BUILD_TYPE=Debug -DEMsoftOO_SDK=/opt/EMsoftOO_SDK -DBUILD_SHARED_LIBS=OFF \
../../EMsoftOO -G Ninja \
&& ninja \
Expand All @@ -19,9 +19,9 @@ RUN cd ~/EMs/EMsoftOOBuild/ && mkdir Debug Release && cd Debug \
&& ninja

# add release version to path
ENV PATH ~/EMs/EMsoftOOBuild/Release/Bin:$PATH
ENV PATH /home/EMs/EMsoftOOBuild/Release/Bin:$PATH
# add backup path of EMsoft
ENV EMSOFTPATHNAME ~/EMs/EMsoftOO
ENV EMSOFTPATHNAME /home/EMs/EMsoftOO

# install a new user
ARG user=EMuser
Expand All @@ -38,6 +38,14 @@ RUN useradd -m $USERNAME && \

USER ${user}

# create EMuser workfolders and set up EMsoftConfig.json file
RUN mkdir /home/${user}/XtalFolder \
&& mkdir /home/${user}/EMPlay \
&& mkdir /home/${user}/.config \
&& mkdir /home/${user}/.config/EMsoft \
&& mkdir /home/${user}/.config/EMsoft/tmp \
&& cp /home/EMs/EMsoftOO/EMsoftOODockerConfig.template /home/${user}/.config/EMsoft/EMsoftConfig.json

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

0 comments on commit cd766ca

Please sign in to comment.