Skip to content

Commit

Permalink
fix: user creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Youen Péron committed Sep 25, 2023
1 parent 6d04a71 commit 708e7ad
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
19 changes: 19 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
{
"name": "Debian",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:bullseye"

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
12 changes: 10 additions & 2 deletions Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ ARG VERSION_MC=RELEASE.2023-09-07T22-48-55Z
ARG VERSION_DSQ=0.23.0
ARG VERSION_DEBIAN=stable-20230904-slim

ARG USERNAME=lino
ARG USER_UID=1000
ARG USER_GID=$USER_UID


FROM cgifr/pimo:${VERSION_PIMO} AS pimo

Expand Down Expand Up @@ -69,6 +73,10 @@ COPY --from=pimo /usr/bin/pimo /usr/bin/pimo
COPY --from=lino /usr/bin/lino /usr/bin/lino
COPY --from=mc /usr/bin/mc /usr/bin/mc

USER 1000:1000
# Create the user lino
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME

USER $USERNAME

WORKDIR /home/lino
WORKDIR /home/$USERNAME

0 comments on commit 708e7ad

Please sign in to comment.