Skip to content

Commit

Permalink
Merge pull request #9 from ryanlovett/xdg-runtime-dir-2
Browse files Browse the repository at this point in the history
Use /tmp/xdg-runtime-dir for XDG_RUNTIME_DIR.
  • Loading branch information
ryanlovett authored Oct 5, 2024
2 parents 75d5b06 + cc2a9b7 commit 0480c5c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile.appendix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
USER root

# xeus-octave complains when XDG_RUNTIME_DIR is not set.
# We dynamically determine the UID, persist XDG_RUNTIME_DIR, and create the dir.
RUN NB_USER_UID=$(id -u ${NB_USER}) && \
XDG_RUNTIME_DIR=/run/user/${NB_USER_UID} && \
echo "XDG_RUNTIME_DIR=/run/user/${NB_USER_UID}" >> /etc/environment && \
install -d -m 0700 -o ${NB_USER} -g ${NB_USER} ${XDG_RUNTIME_DIR}
# We could dynamically determine the UID, use /run/user/${UID} as in systemd,
# then set it in a shell initialization file, but we'd be essentially
# hard-coding the shell.
ENV XDG_RUNTIME_DIR=/tmp/xdg-runtime-dir
RUN install -d -m 0700 -o ${NB_USER} -g ${NB_USER} ${XDG_RUNTIME_DIR}

# As requested in slack.
# http://www.dcc.fc.up.pt/gtries/
Expand Down

0 comments on commit 0480c5c

Please sign in to comment.