From 99794de1a352a5a5cbdc50a1ccc5d2300d6d99e0 Mon Sep 17 00:00:00 2001 From: Marcel Zapf Date: Sat, 24 Aug 2024 23:40:26 +0200 Subject: [PATCH] update --- Dockerfile | 6 ++---- chart/templates/cm-sshconfig.yaml | 1 - chart/values.yaml | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9fa4df4..5da90af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,15 +52,13 @@ RUN curl -L -o /usr/local/bin/mc https://dl.min.io/client/mc/release/linux-amd64 chmod +x /usr/local/bin/mc # Create non-root user with specific UID/GID -RUN addgroup --gid 1001 dev && \ - adduser --uid 1001 --ingroup dev --shell /bin/bash --home /home/dev --disabled-password dev && \ +RUN groupadd -g 1001 dev && \ + useradd -m -d /home/dev -s /bin/bash -g dev -u 1001 dev && \ echo "dev ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers # Adjust permissions for /usr/local and home directories RUN chown -R dev:dev /usr/local /home/dev -RUN echo "+:dev:ALL" >> /etc/security/access.conf && touch /etc/nologin - # Switch to non-root user USER dev diff --git a/chart/templates/cm-sshconfig.yaml b/chart/templates/cm-sshconfig.yaml index 2c1c172..8f2c965 100644 --- a/chart/templates/cm-sshconfig.yaml +++ b/chart/templates/cm-sshconfig.yaml @@ -8,7 +8,6 @@ data: PermitRootLogin no PasswordAuthentication yes ChallengeResponseAuthentication no - UsePrivilegeSeparation no UsePAM yes X11Forwarding yes PrintMotd no diff --git a/chart/values.yaml b/chart/values.yaml index 91aea9f..25ed46d 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -1,7 +1,7 @@ replicaCount: 1 image: - source: ghcr.io/syntax3rror404/k8s-devmachine@sha256:d0917c569a0ac6267cb7bc18a0d950dc97afaaf495f799637394a682be81e95e + source: ghcr.io/syntax3rror404/k8s-devmachine@sha256:9e166d8c10c7f2c27c17027f4363a5862eb4241c8ebb5661b30845b0fc6d2bfd pullPolicy: IfNotPresent service: