Matching user ID to container agent UID

This commit is contained in:
vandomej 2025-09-19 11:46:34 -07:00
parent 28c71177df
commit fe0d32065a

View file

@ -1,15 +1,15 @@
FROM alpine:latest
# Install all necessary tools: git, build tools
RUN apk add --no-cache \
git \
build-base
# Install necessary tools
RUN apk add --no-cache git build-base
# Create a non-root user to run the build
RUN adduser -D builder
# Create builder user with arguments for UID/GID
ARG UID=1000
ARG GID=1000
RUN addgroup -g $GID builder && \
adduser -D -u $UID -G builder builder
USER builder
WORKDIR /home/builder
# The default command will be the build script
COPY build.sh .
CMD ["/bin/sh", "build.sh"]