diff options
author | Ismaël Bouya <ismael.bouya@fretlink.com> | 2021-10-13 16:25:28 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@fretlink.com> | 2021-10-14 15:04:21 +0200 |
commit | 516309b3450efd106238957987a66b1881fc8f5f (patch) | |
tree | f78b742c9c045dba5a66052f1e9e6e1c924555b0 | |
parent | a2c9e219463ea33db5fd57ac178b459bc6d754b5 (diff) | |
download | docker-nix-516309b3450efd106238957987a66b1881fc8f5f.tar.gz docker-nix-516309b3450efd106238957987a66b1881fc8f5f.tar.zst docker-nix-516309b3450efd106238957987a66b1881fc8f5f.zip |
Remove sandbox=false
The sandbox was (probably) enabled due to the .stack/shell.nix files: it made use of buildStackProject, which requires to run outside of the sandbox for some reason ( https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/generic-stack-builder.nix#L25 ). Now that this file is not used anymore, we can reenable the sandbox.
It should help fix in particular this recent issue we’re facing in the CI: https://github.com/jfischoff/tmp-postgres/issues/251
-rw-r--r-- | alpine/Dockerfile | 3 | ||||
-rw-r--r-- | debian/Dockerfile | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/alpine/Dockerfile b/alpine/Dockerfile index db794af..8d6431f 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile | |||
@@ -12,8 +12,7 @@ RUN addgroup -g 30000 -S nixbld \ | |||
12 | && mkdir -m 0755 /nix && chown nixuser /nix \ | 12 | && mkdir -m 0755 /nix && chown nixuser /nix \ |
13 | && apk add --no-cache bash xz \ | 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 | && mkdir -p /etc/nix && touch /etc/nix/nix.conf |
16 | && mkdir -p /etc/nix && echo 'sandbox = false' > /etc/nix/nix.conf | ||
17 | 16 | ||
18 | USER nixuser | 17 | USER nixuser |
19 | ENV USER=nixuser | 18 | ENV USER=nixuser |
diff --git a/debian/Dockerfile b/debian/Dockerfile index 632a741..336cd0d 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile | |||
@@ -12,8 +12,7 @@ RUN addgroup --gid 30000 --system nixbld \ | |||
12 | && mkdir -m 0755 /nix && chown nixuser /nix \ | 12 | && mkdir -m 0755 /nix && chown nixuser /nix \ |
13 | && apt update && apt install -y wget xz-utils \ | 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 | && mkdir -p /etc/nix && touch /etc/nix/nix.conf |
16 | && mkdir -p /etc/nix && echo 'sandbox = false' > /etc/nix/nix.conf | ||
17 | 16 | ||
18 | USER nixuser | 17 | USER nixuser |
19 | ENV USER=nixuser | 18 | ENV USER=nixuser |