From 1850eaec19f397873ddc0747704323779f2cfa8d Mon Sep 17 00:00:00 2001 From: Alex-Welsh Date: Mon, 17 Feb 2025 14:29:13 +0000 Subject: [PATCH] Fix kayobe user id usage --- docker/kayobe/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/kayobe/Dockerfile b/docker/kayobe/Dockerfile index 2400d49..a6f2622 100644 --- a/docker/kayobe/Dockerfile +++ b/docker/kayobe/Dockerfile @@ -58,7 +58,6 @@ RUN python3 -m pip install docker six ENV KAYOBE_USER=stack ARG KAYOBE_USER_UID=1000 ARG KAYOBE_USER_GID=1000 - RUN groupadd -g $KAYOBE_USER_GID -o stack && \ useradd -u $KAYOBE_USER_UID -g $KAYOBE_USER_GID \ -G wheel -m -d /stack \ @@ -87,7 +86,8 @@ RUN chmod 600 /stack/.ssh/config COPY .automation/utils/kayobe-automation-activate .automation.conf/docker*/kayobe/bin/* /usr/local/bin/ # Control host bootsrap without leaving kayobe-config in the image -RUN --mount=type=ssh,uid=1000 --mount=type=tmpfs,target=/tmp/src --mount=type=bind,source=.,target=/src sudo cp -rfp /src /tmp/ && \ +ARG KAYOBE_USER_UID=1000 +RUN --mount=type=ssh,uid=$KAYOBE_USER_UID --mount=type=tmpfs,target=/tmp/src --mount=type=bind,source=.,target=/src sudo cp -rfp /src /tmp/ && \ sudo chown -Rf stack:stack /tmp/src && \ # Strip the secrets so that we don't need to pass in a vault-password grep -lR "\$ANSIBLE_VAULT" /tmp/src | xargs rm -f && \