Skip to content

Instantly share code, notes, and snippets.

@gwpl
Created December 7, 2023 20:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gwpl/36b808f99c195a4677b1eec691590bb2 to your computer and use it in GitHub Desktop.
Save gwpl/36b808f99c195a4677b1eec691590bb2 to your computer and use it in GitHub Desktop.
Nix on Alpine Dockerfile Helloworld
FROM alpine:latest
RUN apk add --no-cache curl xz
RUN addgroup -S nixbld && adduser -S -G nixbld nix
RUN mkdir -m 0755 /nix && chown nix /nix
USER nix
RUN curl -L https://nixos.org/nix/install | sh
ENV USER=nix
ENV PATH=/home/nix/.nix-profile/bin:$PATH
WORKDIR /home/nix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment