3 ARG DEBIAN_FRONTEND=noninteractive
5 RUN apt-get update && \
6 apt-get install --no-install-recommends -y \
26 software-properties-common \
31 apt-get clean && rm -rf /var/lib/apt/lists/* && \
32 mkdir -m 0755 /nix && groupadd -r nixbld && chown root /nix && \
33 for n in $(seq 1 10); do useradd -c "Nix build user $n" -d /var/empty -g nixbld -G nixbld -M -N -r -s "$(command -v nologin)" "nixbld$n"; done
34 RUN gpg --batch --keyserver keys.openpgp.org --recv-keys 7D1E8AFD1D4A16D71FADA2F2CCC85C0E40C06A8C
35 RUN gpg --batch --keyserver keyserver.ubuntu.com --recv-keys FE5AB6C91FEA597C3B31180B73EDE9E8CFBAEF01
36 SHELL ["/bin/bash", "-o", "pipefail", "-c"]
37 RUN set -o pipefail && curl -L https://releases.nixos.org/nix/nix-2.11.0/install | bash
39 # Fixes locale-related issues: https://gitlab.haskell.org/ghc/ghc/-/issues/8118
40 RUN locale-gen en_US.UTF-8
41 ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
45 RUN . "$HOME/.nix-profile/etc/profile.d/nix.sh" && \
46 mkdir "$HOME/gargantext/" && \
47 echo "source $HOME/.nix-profile/etc/profile.d/nix.sh" >> "$HOME/.bashrc" && \
50 ENV PATH=/root/.nix-profile/bin:$PATH
52 RUN . $HOME/.bashrc && nix-env --version
55 curl https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup > /usr/bin/ghcup && \
56 chmod +x /usr/bin/ghcup && \
57 ghcup config set gpg-setting GPGLax
63 # install GHC, stack and cabal
65 ghcup -v install ghc --force ${GHC} && \
66 ghcup -v install cabal --force ${CABAL} && \
67 ghcup -v install stack --force ${STACK}
69 ENV PATH=/root/.ghcup/bin:$PATH
70 ENV PATH=/root/.local/bin:$PATH
72 RUN ghcup set 8.10.7 && ghc --version
74 RUN cabal v2-update && cabal v2-install hpack --overwrite-policy=always
76 WORKDIR "$HOME/gargantext/"