ghcup-hs/docker/arm64v8/buster/Dockerfile

62 lines
2.0 KiB
Docker
Raw Normal View History

2023-02-19 10:11:00 +00:00
FROM arm64v8/debian:10
2022-11-22 11:41:44 +00:00
ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Singapore
COPY update_opt.sh /usr/bin/update_opt.sh
RUN chmod +x /usr/bin/update_opt.sh
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
dirmngr \
g++ \
git \
gnupg \
libsqlite3-dev \
libtinfo-dev \
libgmp-dev \
make \
netbase \
openssh-client \
xz-utils \
zlib1g-dev \
2022-12-18 13:52:51 +00:00
libnuma-dev libgmp10 libssl-dev liblzma-dev libbz2-dev wget lsb-release software-properties-common apt-transport-https gcc autoconf automake build-essential gzip patchelf tree \
2023-02-19 10:11:00 +00:00
llvm-11 clang-11 && \
2022-11-22 11:41:44 +00:00
rm -rf /var/lib/apt/lists/*
2023-02-19 10:11:00 +00:00
RUN update_opt.sh 11 1
2022-11-22 11:41:44 +00:00
2023-12-03 15:55:49 +00:00
ARG GHCUP_VERSION=0.1.20.0
ARG GPG_KEY="7D1E8AFD1D4A16D71FADA2F2CCC85C0E40C06A8C FFEB7CE81E16A36B3E2DED6F2DE04D4E97DB64AD 88B57FCF7DB53B4DB3BFA4B1588764FBE22D19C4 EAF2A9A722C0C96F2B431CA511AAD8CEDEE0CAEF"
2022-11-22 11:41:44 +00:00
# install ghcup
RUN gpg --batch --keyserver keys.openpgp.org --recv-keys $GPG_KEY && \
curl -sSfL -O https://downloads.haskell.org/~ghcup/$GHCUP_VERSION/aarch64-linux-ghcup-$GHCUP_VERSION && \
curl -sSfL -O https://downloads.haskell.org/~ghcup/$GHCUP_VERSION/SHA256SUMS && \
curl -sSfL -O https://downloads.haskell.org/~ghcup/$GHCUP_VERSION/SHA256SUMS.sig && \
gpg --verify SHA256SUMS.sig SHA256SUMS && \
sha256sum -c --ignore-missing SHA256SUMS && \
2023-02-19 10:11:00 +00:00
mv aarch64-linux-ghcup-$GHCUP_VERSION /usr/bin/ghcup && \
2022-11-22 11:41:44 +00:00
chmod +x /usr/bin/ghcup && \
rm -rf SHA256SUMS SHA256SUMS.sig
2023-12-03 15:55:49 +00:00
ARG GHC=9.4.8
ARG CABAL_INSTALL=3.10.2.0
ARG STACK=2.13.1
2022-11-22 11:41:44 +00:00
ENV GHCUP_CURL_OPTS="--silent"
ENV NO_COLOR=1
# install haskell toolchain
RUN ghcup config set gpg-setting GPGStrict && \
ghcup --verbose install ghc --isolate=/usr --force ${GHC} && \
ghcup --verbose install cabal --isolate=/usr/bin --force ${CABAL_INSTALL} && \
2023-02-19 10:11:00 +00:00
ghcup gc -s -c -t
2022-11-22 11:41:44 +00:00
ENV PATH /root/.cabal/bin:/root/.ghcup/bin:/root/.local/bin:$PATH
CMD ["ghci"]