Skip to content

Commit 9402c6f

Browse files
committed
1 parent c499c91 commit 9402c6f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

dogfood/Dockerfile

+8-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,14 @@ RUN addgroup --system nixbld \
324324
USER coder
325325

326326
# Install Nix
327-
RUN sh <(curl -L https://nixos.org/nix/install) --no-daemon
327+
export NIX_VERSION=2.3.15
328+
RUN curl --silent --show-error --location \
329+
"https://releases.nixos.org/nix/nix-${NIX_VERSION}/nix-${NIX_VERSION}-x86_64-linux.tar.xz" \
330+
-o "nix-${NIX_VERSION}-x86_64-linux.tar.xz"
331+
332+
RUN tar -xf "nix-${NIX_VERSION}-x86_64-linux.tar.xz" \
333+
&& bash "nix-${NIX_VERSION}-x86_64-linux/install" "--no-daemon" \
334+
&& rm -rf "nix-${NIX_VERSION}-x86_64-linux.tar.xz"
328335

329336
# Install Nix into our bash profile so `nix-shell`, `nix-build, and `nix` are available
330337
RUN echo '. /home/coder/.nix-profile/etc/profile.d/nix.sh' >> /home/coder/.bashrc

0 commit comments

Comments
 (0)