From 75cabc506563883e5473c5c15b41494566350efd Mon Sep 17 00:00:00 2001 From: Paul B Date: Mon, 29 Oct 2018 10:26:49 +0100 Subject: Build locales with NIX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Again something found and debugged by the 🦸 @haitlahcen --- Dockerfile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 22c0997..5aa7fcc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,6 +24,17 @@ RUN cd && wget https://nixos.org/releases/nix/nix-$NIX_VERSION/nix-$NIX_VERSION- ENV ENV="/home/nixuser/.nix-profile/etc/profile.d/nix.sh" RUN echo ". ${ENV}" >> ${HOME}/.profile - +# All subsequent "RUN" will use a login shell SHELL ["/usr/bin/env", "bash", "-l", "-c"] + +RUN nix-channel --add https://nixos.org/channels/nixpkgs-unstable \ + && nix-channel --update + +# Propagate UTF8 +# https://github.com/NixOS/nix/issues/599#issuecomment-153885553 +# The same is hapenning with stack2nix +RUN nix-env -iA nixpkgs.glibcLocales \ + && echo "export LOCALE_ARCHIVE=$(nix-env --installed --no-name --out-path --query glibc-locales)/lib/locale/locale-archive" >> ${HOME}/.profile + +# Make sure to use "login" shell when running container ENTRYPOINT ["/usr/bin/env", "bash", "-l", "-c"] -- cgit v1.2.3