Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
96570540
Commit
96570540
authored
May 27, 2022
by
Jonas Kaufmann
Committed by
Antoine Kaufmann
May 27, 2022
Browse files
enable running experiments as non-root in Dockerfile.min
parent
511bde6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
docker/Dockerfile.min
docker/Dockerfile.min
+12
-1
No files found.
docker/Dockerfile.min
View file @
96570540
FROM simbricks/simbricks:latest as builder
FROM simbricks/simbricks-runenv:latest
COPY --from=builder /simbricks /simbricks
# Add non-root user for vs code devcontainer.
ARG USERNAME=simbricks
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME --shell /bin/bash \
# Add sudo support for this user and remove the need to type in password.
&& apt-get update \
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME \
COPY --chown=${USERNAME}:${USERNAME} --from=builder /simbricks /simbricks
WORKDIR /simbricks
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment