From c8608c488c10789d381b784cf69bb81e2e2b088d Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Thu, 4 Aug 2016 06:32:27 -0400 Subject: Dockerfile: Add alpine dependencies (#1011) * Dockerfile: add GNU tar native dependency `builtins.fetchTarball` requires GNU tar to be available in the $PATH in order to unpack the fetched tarball (there is a FIXME comment for this), which Alpine does not ship by default (it ships BusyBox tar). * Dockerfile: add GNU bash native dependency `nix-shell` defaults to invoking `bash` from the $PATH for the subshell. In theory this can be overriden with the NIX_BUILD_SHELL environment variable, but this does not work properly. `nix-shell` generates and passes a script (`$rcFile`) to be executed by the subshell which uses bashisms (`source` and `shopt`). Additionally, in interactive mode, `nix-shell` passes the `--rcfile` argument to the shell, which is another bashism. Because `bash` is thus de-facto required, add `bash` as a native package dependency to make it available for `nix-shell`. --- misc/docker/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/docker/Dockerfile b/misc/docker/Dockerfile index 098633fc3..20171d250 100644 --- a/misc/docker/Dockerfile +++ b/misc/docker/Dockerfile @@ -5,7 +5,9 @@ RUN wget -O- http://nixos.org/releases/nix/nix-1.11.2/nix-1.11.2-x86_64-linux.ta && for i in $(seq 1 30); do echo "nixbld$i:x:$((30000 + $i)):30000:::" >> /etc/passwd; done \ && mkdir -m 0755 /nix && USER=root sh nix-*-x86_64-linux/install \ && echo ". /root/.nix-profile/etc/profile.d/nix.sh" >> /etc/profile \ - && rm -r /nix-*-x86_64-linux + && rm -r /nix-*-x86_64-linux \ + && apk --update add bash tar \ + && rm -rf /var/cache/apk/* ONBUILD ENV \ ENV=/etc/profile \ -- cgit v1.2.3