aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPaul Bonaud <paul.bonaud@fretlink.com>2019-12-09 22:14:34 +0100
committerPaul Bonaud <paul.bonaud@fretlink.com>2019-12-10 09:28:34 +0100
commit788f0fc53f4ff1692ea2e0280843f8b86779e1cf (patch)
tree0151c6f8970d6e056a8f5a8000b872b99c69da97
parent9b801ac92ca4d6ae7095b8ce510da61dfce961de (diff)
downloaddocker-nix-788f0fc53f4ff1692ea2e0280843f8b86779e1cf.tar.gz
docker-nix-788f0fc53f4ff1692ea2e0280843f8b86779e1cf.tar.zst
docker-nix-788f0fc53f4ff1692ea2e0280843f8b86779e1cf.zip
Upgrade: nix to latest v2.3.1 and upgrade channel to stable 19.09
-rw-r--r--alpine/Dockerfile10
-rw-r--r--debian/Dockerfile10
2 files changed, 10 insertions, 10 deletions
diff --git a/alpine/Dockerfile b/alpine/Dockerfile
index c5d07b2..1b3d229 100644
--- a/alpine/Dockerfile
+++ b/alpine/Dockerfile
@@ -2,7 +2,7 @@
2FROM alpine 2FROM alpine
3 3
4ARG NIX_VERSION 4ARG NIX_VERSION
5ENV NIX_VERSION ${NIX_VERSION:-2.2.1} 5ENV NIX_VERSION ${NIX_VERSION:-2.3.1}
6ARG LANG 6ARG LANG
7ENV LANG ${LANG:-"en_US.UTF-8"} 7ENV LANG ${LANG:-"en_US.UTF-8"}
8 8
@@ -10,7 +10,7 @@ RUN addgroup -g 30000 -S nixbld \
10 && 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 \ 10 && 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 \
11 && adduser -D nixuser \ 11 && adduser -D nixuser \
12 && mkdir -m 0755 /nix && chown nixuser /nix \ 12 && mkdir -m 0755 /nix && chown nixuser /nix \
13 && apk add --no-cache bash \ 13 && apk add --no-cache bash xz \
14 && rm -rf /var/cache/apk/* \ 14 && rm -rf /var/cache/apk/* \
15 # sandboxing enabled by default since 2.2 15 # sandboxing enabled by default since 2.2
16 && mkdir -p /etc/nix && echo 'sandbox = false' > /etc/nix/nix.conf 16 && mkdir -p /etc/nix && echo 'sandbox = false' > /etc/nix/nix.conf
@@ -19,8 +19,8 @@ USER nixuser
19ENV USER=nixuser 19ENV USER=nixuser
20ENV HOME="/home/nixuser" 20ENV HOME="/home/nixuser"
21 21
22RUN cd && wget https://nixos.org/releases/nix/nix-$NIX_VERSION/nix-$NIX_VERSION-x86_64-linux.tar.bz2 \ 22RUN cd && wget https://nixos.org/releases/nix/nix-$NIX_VERSION/nix-$NIX_VERSION-x86_64-linux.tar.xz \
23 && tar xjf nix-*-x86_64-linux.tar.bz2 \ 23 && tar xJf nix-*-x86_64-linux.tar.xz \
24 && ~/nix-*-x86_64-linux/install \ 24 && ~/nix-*-x86_64-linux/install \
25 && rm -rf ~/nix-*-* 25 && rm -rf ~/nix-*-*
26 26
@@ -29,7 +29,7 @@ RUN echo ". ${ENV}" >> ${HOME}/.profile
29# All subsequent "RUN" will use a login shell 29# All subsequent "RUN" will use a login shell
30SHELL ["/usr/bin/env", "bash", "-l", "-c"] 30SHELL ["/usr/bin/env", "bash", "-l", "-c"]
31 31
32RUN nix-channel --add https://nixos.org/channels/nixpkgs-19.03-darwin nixpkgs \ 32RUN nix-channel --add https://nixos.org/channels/nixpkgs-19.09-darwin nixpkgs \
33 && nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable \ 33 && nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable \
34 && nix-channel --update 34 && nix-channel --update
35 35
diff --git a/debian/Dockerfile b/debian/Dockerfile
index f7034d2..5c4c46f 100644
--- a/debian/Dockerfile
+++ b/debian/Dockerfile
@@ -2,7 +2,7 @@
2FROM debian:stable-slim 2FROM debian:stable-slim
3 3
4ARG NIX_VERSION 4ARG NIX_VERSION
5ENV NIX_VERSION ${NIX_VERSION:-2.2.1} 5ENV NIX_VERSION ${NIX_VERSION:-2.3.1}
6ARG LANG 6ARG LANG
7ENV LANG ${LANG:-"en_US.UTF-8"} 7ENV LANG ${LANG:-"en_US.UTF-8"}
8 8
@@ -10,7 +10,7 @@ RUN addgroup --gid 30000 --system nixbld \
10 && for i in $(seq 1 30); do adduser --system --disabled-password --home /var/empty --gecos "Nix build user $i" --uid $((30000 + i)) --ingroup nixbld nixbld$i ; done \ 10 && for i in $(seq 1 30); do adduser --system --disabled-password --home /var/empty --gecos "Nix build user $i" --uid $((30000 + i)) --ingroup nixbld nixbld$i ; done \
11 && adduser --disabled-password nixuser \ 11 && adduser --disabled-password nixuser \
12 && mkdir -m 0755 /nix && chown nixuser /nix \ 12 && mkdir -m 0755 /nix && chown nixuser /nix \
13 && apt update && apt install -y wget bzip2 \ 13 && apt update && apt install -y wget xz-utils \
14 && apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ 14 && apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
15 # sandboxing enabled by default since 2.2 15 # sandboxing enabled by default since 2.2
16 && mkdir -p /etc/nix && echo 'sandbox = false' > /etc/nix/nix.conf 16 && mkdir -p /etc/nix && echo 'sandbox = false' > /etc/nix/nix.conf
@@ -19,8 +19,8 @@ USER nixuser
19ENV USER=nixuser 19ENV USER=nixuser
20ENV HOME="/home/nixuser" 20ENV HOME="/home/nixuser"
21 21
22RUN cd && wget https://nixos.org/releases/nix/nix-$NIX_VERSION/nix-$NIX_VERSION-x86_64-linux.tar.bz2 \ 22RUN cd && wget https://nixos.org/releases/nix/nix-$NIX_VERSION/nix-$NIX_VERSION-x86_64-linux.tar.xz \
23 && tar xjf nix-*-x86_64-linux.tar.bz2 \ 23 && tar xJf nix-*-x86_64-linux.tar.xz \
24 && ~/nix-*-x86_64-linux/install \ 24 && ~/nix-*-x86_64-linux/install \
25 && rm -rf ~/nix-*-* 25 && rm -rf ~/nix-*-*
26 26
@@ -29,7 +29,7 @@ RUN echo ". ${ENV}" >> ${HOME}/.profile
29# All subsequent "RUN" will use a login shell 29# All subsequent "RUN" will use a login shell
30SHELL ["/usr/bin/env", "bash", "-l", "-c"] 30SHELL ["/usr/bin/env", "bash", "-l", "-c"]
31 31
32RUN nix-channel --add https://nixos.org/channels/nixpkgs-19.03-darwin nixpkgs \ 32RUN nix-channel --add https://nixos.org/channels/nixpkgs-19.09-darwin nixpkgs \
33 && nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable \ 33 && nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable \
34 && nix-channel --update 34 && nix-channel --update
35 35