diff options
author | Hussein A <44173825+haitlahcen@users.noreply.github.com> | 2019-03-22 12:41:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-22 12:41:32 +0100 |
commit | 9b801ac92ca4d6ae7095b8ce510da61dfce961de (patch) | |
tree | c380b29934843d7880c81467f74c5f49a179b007 | |
parent | 3873defb784f67ae419f93cdcfa25e655060ad76 (diff) | |
parent | f3feadbd827b5d03f09b6f91006e5745693674fd (diff) | |
download | docker-nix-9b801ac92ca4d6ae7095b8ce510da61dfce961de.tar.gz docker-nix-9b801ac92ca4d6ae7095b8ce510da61dfce961de.tar.zst docker-nix-9b801ac92ca4d6ae7095b8ce510da61dfce961de.zip |
Merge pull request #5 from haitlahcen/upgrade-19.032.2.1-channel-19.03
Upgrade from 18.09 to 19.03
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | alpine/Dockerfile | 11 | ||||
-rw-r--r-- | debian/Dockerfile | 11 |
3 files changed, 15 insertions, 9 deletions
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | This image contains an installation of the [Nix package manager](https://nixos.org/nix/) installed as a single-user `nixuser`. | 5 | This image contains an installation of the [Nix package manager](https://nixos.org/nix/) installed as a single-user `nixuser`. |
6 | 6 | ||
7 | This is based on the unpublished Dockerfile of https://github.com/romcheck/nix. | 7 | This is based on the unpublished Dockerfile previously available at https://github.com/romcheck/nix. |
8 | 8 | ||
9 | Use this build to create your own customized images as follows: | 9 | Use this build to create your own customized images as follows: |
10 | 10 | ||
diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 1bf3a3b..c5d07b2 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile | |||
@@ -2,7 +2,7 @@ | |||
2 | FROM alpine | 2 | FROM alpine |
3 | 3 | ||
4 | ARG NIX_VERSION | 4 | ARG NIX_VERSION |
5 | ENV NIX_VERSION ${NIX_VERSION:-2.1.3} | 5 | ENV NIX_VERSION ${NIX_VERSION:-2.2.1} |
6 | ARG LANG | 6 | ARG LANG |
7 | ENV LANG ${LANG:-"en_US.UTF-8"} | 7 | ENV LANG ${LANG:-"en_US.UTF-8"} |
8 | 8 | ||
@@ -11,7 +11,9 @@ RUN addgroup -g 30000 -S nixbld \ | |||
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 \ |
14 | && rm -rf /var/cache/apk/* | 14 | && rm -rf /var/cache/apk/* \ |
15 | # sandboxing enabled by default since 2.2 | ||
16 | && mkdir -p /etc/nix && echo 'sandbox = false' > /etc/nix/nix.conf | ||
15 | 17 | ||
16 | USER nixuser | 18 | USER nixuser |
17 | ENV USER=nixuser | 19 | ENV USER=nixuser |
@@ -27,8 +29,9 @@ RUN echo ". ${ENV}" >> ${HOME}/.profile | |||
27 | # All subsequent "RUN" will use a login shell | 29 | # All subsequent "RUN" will use a login shell |
28 | SHELL ["/usr/bin/env", "bash", "-l", "-c"] | 30 | SHELL ["/usr/bin/env", "bash", "-l", "-c"] |
29 | 31 | ||
30 | RUN nix-channel --add https://nixos.org/channels/nixpkgs-18.09-darwin nixpkgs \ | 32 | RUN nix-channel --add https://nixos.org/channels/nixpkgs-19.03-darwin nixpkgs \ |
31 | && nix-channel --update | 33 | && nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable \ |
34 | && nix-channel --update | ||
32 | 35 | ||
33 | # Propagate UTF8 | 36 | # Propagate UTF8 |
34 | # https://github.com/NixOS/nix/issues/599#issuecomment-153885553 | 37 | # https://github.com/NixOS/nix/issues/599#issuecomment-153885553 |
diff --git a/debian/Dockerfile b/debian/Dockerfile index 70e36fc..f7034d2 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile | |||
@@ -2,7 +2,7 @@ | |||
2 | FROM debian:stable-slim | 2 | FROM debian:stable-slim |
3 | 3 | ||
4 | ARG NIX_VERSION | 4 | ARG NIX_VERSION |
5 | ENV NIX_VERSION ${NIX_VERSION:-2.1.3} | 5 | ENV NIX_VERSION ${NIX_VERSION:-2.2.1} |
6 | ARG LANG | 6 | ARG LANG |
7 | ENV LANG ${LANG:-"en_US.UTF-8"} | 7 | ENV LANG ${LANG:-"en_US.UTF-8"} |
8 | 8 | ||
@@ -11,7 +11,9 @@ RUN addgroup --gid 30000 --system nixbld \ | |||
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 bzip2 \ |
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 | ||
16 | && mkdir -p /etc/nix && echo 'sandbox = false' > /etc/nix/nix.conf | ||
15 | 17 | ||
16 | USER nixuser | 18 | USER nixuser |
17 | ENV USER=nixuser | 19 | ENV USER=nixuser |
@@ -27,8 +29,9 @@ RUN echo ". ${ENV}" >> ${HOME}/.profile | |||
27 | # All subsequent "RUN" will use a login shell | 29 | # All subsequent "RUN" will use a login shell |
28 | SHELL ["/usr/bin/env", "bash", "-l", "-c"] | 30 | SHELL ["/usr/bin/env", "bash", "-l", "-c"] |
29 | 31 | ||
30 | RUN nix-channel --add https://nixos.org/channels/nixpkgs-18.09-darwin nixpkgs \ | 32 | RUN nix-channel --add https://nixos.org/channels/nixpkgs-19.03-darwin nixpkgs \ |
31 | && nix-channel --update | 33 | && nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable \ |
34 | && nix-channel --update | ||
32 | 35 | ||
33 | # Propagate UTF8 | 36 | # Propagate UTF8 |
34 | # https://github.com/NixOS/nix/issues/599#issuecomment-153885553 | 37 | # https://github.com/NixOS/nix/issues/599#issuecomment-153885553 |