FROM alpine
ARG NIX_VERSION
-ENV NIX_VERSION ${NIX_VERSION:-2.1.3}
+ENV NIX_VERSION ${NIX_VERSION:-2.2.1}
ARG LANG
ENV LANG ${LANG:-"en_US.UTF-8"}
&& adduser -D nixuser \
&& mkdir -m 0755 /nix && chown nixuser /nix \
&& apk add --no-cache bash \
- && rm -rf /var/cache/apk/*
+ && rm -rf /var/cache/apk/* \
+ # sandboxing enabled by default since 2.2
+ && mkdir -p /etc/nix && echo 'sandbox = false' > /etc/nix/nix.conf
USER nixuser
ENV USER=nixuser
FROM debian:stable-slim
ARG NIX_VERSION
-ENV NIX_VERSION ${NIX_VERSION:-2.1.3}
+ENV NIX_VERSION ${NIX_VERSION:-2.2.1}
ARG LANG
ENV LANG ${LANG:-"en_US.UTF-8"}
&& adduser --disabled-password nixuser \
&& mkdir -m 0755 /nix && chown nixuser /nix \
&& apt update && apt install -y wget bzip2 \
- && apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
+ && apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
+ # sandboxing enabled by default since 2.2
+ && mkdir -p /etc/nix && echo 'sandbox = false' > /etc/nix/nix.conf
USER nixuser
ENV USER=nixuser