From a744cb7fcc240e1e356b349271b9ab02cfc43c9f Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Wed, 25 Oct 2023 23:18:27 +0000 Subject: [PATCH 1/3] feat: set custom user/group ids --- Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index b4117c4..40c93e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,10 @@ FROM ubuntu:22.04 # system deps +ARG USER_UID=1000 +ARG USER_GID=1000 +ARG DOCKER_GID=999 +ARG WHEEL_GID=980 ENV DEBIAN_FRONTEND noninteractive RUN apt-get update \ && apt-get install -y software-properties-common \ @@ -71,11 +75,11 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* \ && locale-gen en_US.UTF-8 \ && echo 'setup unprivileged user' \ - && groupadd --gid 980 wheel \ - && groupadd --gid 999 docker \ - && groupadd --gid 1000 coder \ + && groupadd --gid ${WHEEL_GID} wheel \ + && groupadd --gid ${DOCKER_GID} docker \ + && groupadd --gid ${USER_GID} coder \ && useradd \ - --uid 1000 \ + --uid ${USER_UID} \ --gid coder \ --groups docker,wheel \ --shell $(which fish) \ -- 2.47.2 From 6f574e0a2d8fbba6198c69ed689fc2f5c8d1ee80 Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Wed, 25 Oct 2023 23:19:33 +0000 Subject: [PATCH 2/3] feat: set basic git configuration --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index 40c93e6..333b6bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -158,6 +158,13 @@ RUN fish -c true \ && echo 'eval "$(${XDG_DATA_HOME}/rtx/bin/rtx activate bash)"' >> ${HOME}/.bashrc \ && echo 'eval "$(zoxide init bash)"' >> ${HOME}/.bashrc +# configure git +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 core.editor nvim + # install rtx plugins RUN ${XDG_DATA_HOME}/rtx/bin/rtx plugins install \ awscli \ -- 2.47.2 From 9a53b1f2b040953ced98acd5fc4e94f95ae9900c Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Wed, 25 Oct 2023 23:20:20 +0000 Subject: [PATCH 3/3] chore: remove jq from rtx `jq` utility is installed through system package --- Dockerfile | 1 - config/rtx/config.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 333b6bf..6a60d79 100644 --- a/Dockerfile +++ b/Dockerfile @@ -171,7 +171,6 @@ RUN ${XDG_DATA_HOME}/rtx/bin/rtx plugins install \ elixir \ erlang \ helm \ - jq \ kubectl \ poetry \ terraform diff --git a/config/rtx/config.toml b/config/rtx/config.toml index c751f66..e457419 100644 --- a/config/rtx/config.toml +++ b/config/rtx/config.toml @@ -4,7 +4,6 @@ elixir = "1.15.4-otp-26" erlang = "26.0.2" go = "1.20.6" helm = "3.12.2" -jq = "1.7" kubectl = "1.27.4" node = "20.6.1" poetry = "1.5.1" -- 2.47.2