From 90131929b5c1586efd5f190575e69638fc69c9aa Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Sun, 31 Mar 2024 20:53:45 +0000 Subject: [PATCH 1/3] fix: create extra groups before system setup This avoids conflict with system groups. --- Dockerfile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index e5a3e61..cedce6f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,18 @@ FROM ubuntu:mantic-20240216 -# system deps +# user setup ARG USER_UID=1000 ARG USER_GID=1000 ARG DOCKER_GID=999 ARG WHEEL_GID=980 +RUN echo 'remove existing ubuntu user' \ + && groupdel --force ubuntu \ + && userdel --force ubuntu \ + && echo 'setup extra groups' \ + && groupadd --gid ${WHEEL_GID} wheel \ + && groupadd --gid ${DOCKER_GID} docker + +# system deps ENV DEBIAN_FRONTEND noninteractive RUN apt-get update \ && apt-get install -y software-properties-common \ @@ -83,15 +91,7 @@ RUN apt-get update \ zlib1g-dev \ && rm -rf /var/lib/apt/lists/* \ && locale-gen en_US.UTF-8 \ - && echo 'remove existing ubuntu user' \ - && groupdel --force ubuntu \ - && userdel --force ubuntu \ - && echo 'update gid from systemd-journal group' \ - && groupmod -g 994 systemd-journal \ - && chgrp --recursive systemd-journal /var/log/journal \ && echo 'setup unprivileged user' \ - && groupadd --gid ${WHEEL_GID} wheel \ - && groupadd --gid ${DOCKER_GID} docker \ && groupadd --gid ${USER_GID} coder \ && useradd \ --uid ${USER_UID} \ -- 2.47.2 From 432ca341e3c800c8d2dae3b989130945ae9bc254 Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Sun, 31 Mar 2024 21:43:18 +0000 Subject: [PATCH 2/3] chore: indicate allowed ssh signers for git --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index cedce6f..12ba155 100644 --- a/Dockerfile +++ b/Dockerfile @@ -215,6 +215,7 @@ ARG GIT_USER_EMAIL ARG GIT_USER_NAME RUN git config --global user.email "${GIT_USER_EMAIL}" \ && git config --global user.name "${GIT_USER_NAME}" \ + && git config --global gpg.ssh.allowedSignersFile "${XDG_CONFIG_HOME}/git/allowed_signers" \ && git config --global core.editor nvim \ && git config --global diff.tool nvimdiff \ && git config --global difftool.nvimdiff.layout "LOCAL,REMOTE" \ -- 2.47.2 From 383f57bbfe83b542e27ec60b91c793e37cf2b080 Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Sun, 7 Apr 2024 18:33:50 +0000 Subject: [PATCH 3/3] feat(git): add template for conditional config --- config/git/.exists | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/git/.exists b/config/git/.exists index e69de29..51ba6f3 100644 --- a/config/git/.exists +++ b/config/git/.exists @@ -0,0 +1,9 @@ +[commit] + gpgsign = true +[gpg] + format = ssh +[user] + email = {{email}} + name = {{name}} + signingKey = {{path-to-pub-ssh-key}} + -- 2.47.2