Skip to content

Commit

Permalink
added nixbld users
Browse files Browse the repository at this point in the history
  • Loading branch information
heywoodlh committed Nov 21, 2024
1 parent 0f27a87 commit 63a787c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions nix/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ FROM alpine:latest AS static
COPY --from=static-fetcher /nix-bin /usr/bin/nix
ENV NIX_CONFIG="extra-experimental-features = nix-command flakes"

RUN apk add --no-cache curl bash \
&& addgroup nixbld
# Add dependencies and create build users
RUN apk add --no-cache curl bash shadow \
&& mkdir -p /etc/nix \
&& groupadd nixbld \
&& for n in $(seq 1 10); do useradd -c "Nix build user $n" \
-d /var/empty -g nixbld -G nixbld -M -N -r -s "$(which nologin)" \
nixbld$n; done

# Testing targets
FROM base AS test
Expand Down

0 comments on commit 63a787c

Please sign in to comment.