Skip to content

Commit 45126f1

Browse files
committed
Replaced UID/GID with USER_UID/USER_GID
1 parent 0116023 commit 45126f1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ FROM debian:12-slim
22

33
SHELL ["/usr/bin/env", "bash", "-c"]
44

5-
ARG UID
6-
ARG GID
5+
ARG USER_UID
6+
ARG USER_GID
77
ARG DEBIAN_FRONTEND='noninteractive'
88

99
WORKDIR /root
@@ -32,8 +32,8 @@ RUN --mount=target=/var/lib/apt/lists,type=cache --mount=target=/var/cache/apt,t
3232
&& echo 'HostKey /ssh/ssh_host_ed25519_key' >> /etc/ssh/sshd_config \
3333
&& echo 'AllowUsers rsync' >> /etc/ssh/sshd_config \
3434
&& rm /etc/ssh/ssh_host_* \
35-
&& addgroup --gid "$GID" rsync \
36-
&& adduser --uid "$UID" --gid "$GID" --gecos '' --shell /bin/bash --disabled-password --no-create-home rsync \
35+
&& addgroup --gid "$USER_GID" rsync \
36+
&& adduser --uid "$USER_UID" --gid "$USER_GID" --gecos '' --shell /bin/bash --disabled-password --no-create-home rsync \
3737
&& mkdir /home/rsync \
3838
&& chown rsync:rsync /home/rsync \
3939
&& chmod 700 /home/rsync

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ else
1919
image_tag="${image_name}:latest-${image_arch}"
2020
fi
2121

22-
docker build -t "$image_tag" --pull --build-arg "UID=${UID:-50000}" --build-arg "GID=${GID:-50000}" .
22+
docker build -t "$image_tag" --pull --build-arg "USER_UID=${USER_UID:-50000}" --build-arg "USER_GID=${USER_GID:-50000}" .
2323

2424
if [[ -n "${CIRCLE_BRANCH+x}" ]]; then
2525
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USERNAME" --password-stdin

0 commit comments

Comments
 (0)