aboutsummaryrefslogtreecommitdiffhomepage
path: root/debian/Dockerfile
diff options
context:
space:
mode:
authorPaul Bonaud <paul.bonaud@fretlink.com>2020-02-05 09:56:55 +0100
committerPaul Bonaud <paul.bonaud@fretlink.com>2020-02-05 17:47:22 +0100
commit63ece951168caf2e68b403b76e628e6894d92d73 (patch)
treee3abd3690e3c71e164ef03bd7fe6619ef5d4b880 /debian/Dockerfile
parentc17ecb7e7616a5b01908cf6d3dde42f5bb090a67 (diff)
downloaddocker-nix-63ece951168caf2e68b403b76e628e6894d92d73.tar.gz
docker-nix-63ece951168caf2e68b403b76e628e6894d92d73.tar.zst
docker-nix-63ece951168caf2e68b403b76e628e6894d92d73.zip
volume: change base images to be able to mount /nix/store as volume
These changes will allow the nix store to be mounted as a volume and still be able to launch a bash console with the correct nix environment.
Diffstat (limited to 'debian/Dockerfile')
-rw-r--r--debian/Dockerfile13
1 files changed, 11 insertions, 2 deletions
diff --git a/debian/Dockerfile b/debian/Dockerfile
index 5c4c46f..90b2e65 100644
--- a/debian/Dockerfile
+++ b/debian/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
39RUN nix-env -iA nixpkgs.glibcLocales \ 39RUN 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
45RUN cp -R /nix /home/nixuser/initial-nix
46VOLUME ["/nix"]
47# Create bash profile
48COPY --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
43ENTRYPOINT ["/usr/bin/env", "bash", "-l", "-c"] 52ENTRYPOINT ["/usr/bin/env", "bash", "-l", "-c"]