Skip to content

Commit

Permalink
Merge pull request #214 from flux-framework/update/devcontainer-permi…
Browse files Browse the repository at this point in the history
…ssions

docker dev environment fix permissions
  • Loading branch information
vsoch authored Feb 27, 2023
2 parents 29f7de3 + 5186f93 commit 2fbd2ae
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
FROM fluxrm/flux-sched:focal

# Match the default user id for a single system so we aren't root
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=1000
ENV USERNAME=${USERNAME}
ENV USER_UID=${USER_UID}
ENV USER_GID=${USER_GID}

LABEL maintainer="Vanessasaurus <@vsoch>"

# Pip not provided in this version
Expand All @@ -17,5 +25,11 @@ RUN python3 -m pip install IPython && \
# For developer convenience
ln -s /usr/bin/python3 /usr/bin/python

# Add the group and user that match our ids
RUN groupadd -g ${USER_GID} ${USERNAME} && \
adduser --disabled-password --uid ${USER_UID} --gid ${USER_GID} --gecos "" ${USERNAME} && \
echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers
USER $USERNAME

ENV PATH=/env/bin:${PATH}
WORKDIR /workspace/flux-docs

0 comments on commit 2fbd2ae

Please sign in to comment.