Skip to content

Commit

Permalink
write default definition of LDMX_BASE into skeleton .profile
Browse files Browse the repository at this point in the history
  • Loading branch information
tomeichlersmith committed Mar 29, 2024
1 parent a1b94a7 commit c9f95d2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,13 @@ RUN update-ca-certificates
# copy environment initialization script into container
# and make sure the default profile will call it as well
COPY ./ldmx-env-init.sh /etc/
RUN printf "\n. /etc/ldmx-env-init.sh\n" >> /etc/skel/.profile
RUN printf "%s\n" \
"# make sure LDMX_BASE is defined for ldmx-env-init.sh" \
"if [ -z \"\${LDMX_BASE+x}\" ]; then" \
" export LDMX_BASE=\"\${HOME}\"" \
"fi" \
". /etc/ldmx-env-init.sh" \
>> /etc/skel/.profile

#run environment setup when docker container is launched and decide what to do from there
# will require the environment variable LDMX_BASE defined
Expand Down

0 comments on commit c9f95d2

Please sign in to comment.