From 96c500dbe8e3881f98a3db7e5ab653750c5dccdf Mon Sep 17 00:00:00 2001 From: lostbean Date: Thu, 15 Feb 2024 10:28:35 -0300 Subject: [PATCH] replace nix installer --- core/server/Dockerfile | 7 ++++--- core/server/Dockerfile.debug | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/core/server/Dockerfile b/core/server/Dockerfile index 31a9b1f382..f601298e67 100644 --- a/core/server/Dockerfile +++ b/core/server/Dockerfile @@ -4,9 +4,10 @@ FROM alpine:3.17 RUN apk update && apk add --no-cache bash protobuf-dev sudo shadow curl xz # Install Nix -# We need to set filter-syscalls to false to allow Nix to work properly inside a container: https://github.com/NixOS/nix/issues/5258 -ENV NIX_INSTALL_ARGS="--extra-conf 'filter-syscalls = false'" -RUN sh <(curl -L https://nixos.org/nix/install) --daemon --yes +# We need to set filter-syscalls to false to allow Nix install to work properly inside a container with cross platform emulation +# via QEMU: https://github.com/NixOS/nix/issues/5258 and use a more flexible installer https://github.com/DeterminateSystems/nix-installer +# with a workaround on the same issue: https://github.com/DeterminateSystems/nix-installer/issues/324) +RUN curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --no-confirm --init none --extra-conf "filter-syscalls = false" ARG TARGETARCH diff --git a/core/server/Dockerfile.debug b/core/server/Dockerfile.debug index 212f5d92f4..a224ddcf48 100644 --- a/core/server/Dockerfile.debug +++ b/core/server/Dockerfile.debug @@ -4,9 +4,10 @@ FROM alpine:3.19 RUN apk update && apk add --no-cache bash protobuf-dev sudo shadow curl xz # Install Nix -# We need to set filter-syscalls to false to allow Nix to work properly inside a container: https://github.com/NixOS/nix/issues/5258 -ENV NIX_INSTALL_ARGS="--extra-conf 'filter-syscalls = false'" -RUN sh <(curl -L https://nixos.org/nix/install) --daemon --yes +# We need to set filter-syscalls to false to allow Nix install to work properly inside a container with cross platform emulation +# via QEMU: https://github.com/NixOS/nix/issues/5258 and use a more flexible installer https://github.com/DeterminateSystems/nix-installer +# with a workaround on the same issue: https://github.com/DeterminateSystems/nix-installer/issues/324) +RUN curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --no-confirm --init none --extra-conf "filter-syscalls = false" # Make sure that you changed the port inside the APIC's code before changing it here EXPOSE 50103