Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Commit

Permalink
Update to nix version 2.2.1.
Browse files Browse the repository at this point in the history
The new version has sandboxed builds enabled by default, which
won't work in an unprivileged docker container, so we disable
that feature by way of /etc/nix/nix.conf.

Closes #6.
  • Loading branch information
peti committed Jan 21, 2019
1 parent 8107c43 commit fd64725
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ FROM alpine
RUN apk add --no-cache --update openssl

# Download Nix and install it into the system.
RUN wget https://nixos.org/releases/nix/nix-2.1.3/nix-2.1.3-x86_64-linux.tar.bz2 \
&& echo "3169d05aa713f6ffa774f001cae133557d3ad72e23d9b6f6ebbddd77b477304f nix-2.1.3-x86_64-linux.tar.bz2" | sha256sum -c \
RUN wget https://nixos.org/releases/nix/nix-2.2.1/nix-2.2.1-x86_64-linux.tar.bz2 \
&& echo "e229e28f250cad684c278c9007b07a24eb4ead239280c237ed2245871eca79e0 nix-2.2.1-x86_64-linux.tar.bz2" | sha256sum -c \
&& tar xjf nix-*-x86_64-linux.tar.bz2 \
&& addgroup -g 30000 -S nixbld \
&& for i in $(seq 1 30); do adduser -S -D -h /var/empty -g "Nix build user $i" -u $((30000 + i)) -G nixbld nixbld$i ; done \
&& mkdir -m 0755 /etc/nix \
&& echo 'sandbox = false' > /etc/nix/nix.conf \
&& mkdir -m 0755 /nix && USER=root sh nix-*-x86_64-linux/install \
&& ln -s /nix/var/nix/profiles/default/etc/profile.d/nix.sh /etc/profile.d/ \
&& rm -r /nix-*-x86_64-linux* \
Expand Down

0 comments on commit fd64725

Please sign in to comment.