diff options
author | paulrbr-fl <43074087+paulrbr-fl@users.noreply.github.com> | 2020-02-05 18:15:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-05 18:15:32 +0100 |
commit | 937d660cdc7b7b82cc6e75641ee6f21ff43e017a (patch) | |
tree | e3abd3690e3c71e164ef03bd7fe6619ef5d4b880 /alpine/Dockerfile | |
parent | c17ecb7e7616a5b01908cf6d3dde42f5bb090a67 (diff) | |
parent | 63ece951168caf2e68b403b76e628e6894d92d73 (diff) | |
download | docker-nix-937d660cdc7b7b82cc6e75641ee6f21ff43e017a.tar.gz docker-nix-937d660cdc7b7b82cc6e75641ee6f21ff43e017a.tar.zst docker-nix-937d660cdc7b7b82cc6e75641ee6f21ff43e017a.zip |
Merge pull request #7 from paulrbr-fl/nix-store-as-a-volym2.3.1-channel-19.09-v2
volume: change base images to be able to mount /nix/store as volume
Diffstat (limited to 'alpine/Dockerfile')
-rw-r--r-- | alpine/Dockerfile | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 1b3d229..0e42345 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile | |||
@@ -36,8 +36,17 @@ RUN nix-channel --add https://nixos.org/channels/nixpkgs-19.09-darwin nixpkgs \ | |||
36 | # Propagate UTF8 | 36 | # Propagate UTF8 |
37 | # https://github.com/NixOS/nix/issues/599#issuecomment-153885553 | 37 | # https://github.com/NixOS/nix/issues/599#issuecomment-153885553 |
38 | # The same is hapenning with stack2nix | 38 | # The same is hapenning with stack2nix |
39 | RUN nix-env -iA nixpkgs.glibcLocales \ | 39 | RUN nix-env -iA nixpkgs.glibcLocales |
40 | && echo "export LOCALE_ARCHIVE=$(nix-env --installed --no-name --out-path --query glibc-locales)/lib/locale/locale-archive" >> ${HOME}/.profile | 40 | |
41 | # < Nix context as a volume | ||
42 | # We want to be able to define /nix/store as a volume | ||
43 | # We thus need to "save" the current nix context to be able | ||
44 | # to restore it at startup time | ||
45 | RUN cp -R /nix /home/nixuser/initial-nix | ||
46 | VOLUME ["/nix"] | ||
47 | # Create bash profile | ||
48 | COPY --chown=nixuser:nixuser files/.profile ${HOME}/.profile | ||
49 | # /> | ||
41 | 50 | ||
42 | # Make sure to use "login" shell when running container | 51 | # Make sure to use "login" shell when running container |
43 | ENTRYPOINT ["/usr/bin/env", "bash", "-l", "-c"] | 52 | ENTRYPOINT ["/usr/bin/env", "bash", "-l", "-c"] |