Granting builder permissions to output folder

This commit is contained in:
vandomej 2025-09-19 11:49:33 -07:00
parent fe0d32065a
commit 85a35116e8

View file

@ -3,11 +3,14 @@ FROM alpine:latest
# Install necessary tools # Install necessary tools
RUN apk add --no-cache git build-base RUN apk add --no-cache git build-base
# Create builder user with arguments for UID/GID # Create output directory and set proper permissions FIRST
ARG UID=1000 RUN mkdir -p /home/builder/output && \
ARG GID=1000 chmod 777 /home/builder/output
RUN addgroup -g $GID builder && \
adduser -D -u $UID -G builder builder # Create builder user
RUN adduser -D builder && \
chown -R builder:builder /home/builder
USER builder USER builder
WORKDIR /home/builder WORKDIR /home/builder