3 ARG DEBIAN_FRONTEND=noninteractive
7 COPY ./shell.nix /builds/gargantext/shell.nix
8 COPY ./nix/pkgs.nix /builds/gargantext/nix/pkgs.nix
9 COPY ./nix/pinned-22.05.nix /builds/gargantext/nix/pinned-22.05.nix
12 RUN apt-get update && \
13 apt-get install --no-install-recommends -y \
33 software-properties-common \
39 apt-get clean && rm -rf /var/lib/apt/lists/* && \
40 mkdir -m 0755 /nix && groupadd -r nixbld && chown root /nix && \
41 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
43 RUN gpg --batch --keyserver keys.openpgp.org --recv-keys 7D1E8AFD1D4A16D71FADA2F2CCC85C0E40C06A8C && \
44 gpg --batch --keyserver keyserver.ubuntu.com --recv-keys FE5AB6C91FEA597C3B31180B73EDE9E8CFBAEF01
45 SHELL ["/bin/bash", "-o", "pipefail", "-c"]
47 RUN set -o pipefail && \
48 bash <(curl -L https://releases.nixos.org/nix/nix-2.15.0/install) --no-daemon && \
49 locale-gen en_US.UTF-8
51 ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
54 RUN . "$HOME/.nix-profile/etc/profile.d/nix.sh" && \
55 mkdir -p "/builds/gargantext/" && chmod 777 -R "/builds/gargantext" && \
56 echo "source $HOME/.nix-profile/etc/profile.d/nix.sh" >> "$HOME/.bashrc" && \
59 ENV PATH=/root/.nix-profile/bin:$PATH
61 RUN . $HOME/.bashrc && nix-env --version
64 curl https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup > /usr/bin/ghcup && \
65 chmod +x /usr/bin/ghcup && \
66 ghcup config set gpg-setting GPGLax && \
67 ghcup -v install ghc --force ${GHC} && \
68 ghcup -v install cabal --force ${CABAL} && \
69 ghcup -v install stack --force ${STACK}
71 ENV PATH=/root/.ghcup/bin:$PATH
72 ENV PATH=/root/.local/bin:$PATH
75 RUN cd /builds/gargantext && nix-shell
76 RUN ghcup set 8.10.7 && cabal v2-update && cabal v2-install hpack --overwrite-policy=always
78 WORKDIR "/builds/gargantext/"