Skip to content

Commit

Permalink
ONBUILD USER root
Browse files Browse the repository at this point in the history
  • Loading branch information
eeholmes authored Oct 23, 2024
1 parent 1ccf23d commit eca6c66
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions appendix
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ RUN mandb
RUN rm -rf ${REPO_DIR}/book ${REPO_DIR}/docs

# Copy Desktop files into ${REPO_DIR}/Desktop if they exist. First copy files to tmpbuild
ONBUILD USER root
ONBUILD COPY . /tmpbuild/
ONBUILD RUN if [ -d /tmpbuild/Desktop ]; then \
mkdir -p ${REPO_DIR}/Desktop && \
cp -r /tmpbuild/Desktop/* ${REPO_DIR}/Desktop/; \
fi
ONBUILD RUN whoami && rm -rf /tmpbuild
ONBUILD USER ${NB_USER}

# Revert to default user
USER ${NB_USER}

0 comments on commit eca6c66

Please sign in to comment.