Dockerfile.min 767 Bytes
Newer Older
1
2
FROM simbricks/simbricks:latest as builder
FROM simbricks/simbricks-runenv:latest
3
4
5
6
7
8
9
10
11
12
# 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 \
13
 && chmod 0440 /etc/sudoers.d/$USERNAME
14
COPY --chown=${USERNAME}:${USERNAME} --from=builder /simbricks /simbricks
15
WORKDIR /simbricks
16
ENV PYTHONPATH=/simbricks/experiments
17
18
RUN sudo cp docker/simbricks-run /usr/bin/ \
 && sudo chmod 755 /usr/bin/simbricks-run