Skip to content

Commit 3495a78

Browse files
committed
Let us template the Dockerfiles
1 parent aa517c2 commit 3495a78

File tree

15 files changed

+372
-24
lines changed

15 files changed

+372
-24
lines changed

8.4/buster/Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Dockerfile for a haskell environment
2+
FROM buildpack-deps:buster
3+
4+
## ensure locale is set during build
5+
ENV LANG C.UTF-8
6+
7+
RUN apt-get update && \
8+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git && \
9+
echo 'deb http://downloads.haskell.org/debian buster main' > /etc/apt/sources.list.d/ghc.list && \
10+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574 && \
11+
apt-get update && \
12+
apt-get install -y --no-install-recommends ghc-8.4.4 cabal-install-3.0 \
13+
libtinfo-dev && \
14+
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v2.1.3/stack-2.1.3-linux-x86_64.tar.gz -o stack.tar.gz && \
15+
echo "c724b207831fe5f06b087bac7e01d33e61a1c9cad6be0468f9c117d383ec5673 stack.tar.gz" | sha256sum -c - && \
16+
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 && \
17+
/usr/local/bin/stack config set system-ghc --global true && \
18+
/usr/local/bin/stack config set install-ghc --global false && \
19+
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz
20+
21+
ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/3.0/bin:/opt/ghc/8.8.1/bin:$PATH
22+
23+
## run ghci by default unless a command is specified
24+
CMD ["ghci"]

8.4/buster/slim/Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Dockerfile for a haskell environment
2+
FROM debian:buster
3+
4+
## ensure locale is set during build
5+
ENV LANG C.UTF-8
6+
7+
RUN apt-get update && \
8+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git && \
9+
echo 'deb http://downloads.haskell.org/debian buster main' > /etc/apt/sources.list.d/ghc.list && \
10+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574 && \
11+
apt-get update && \
12+
apt-get install -y --no-install-recommends ghc-8.4.4 cabal-install-3.0 \
13+
zlib1g-dev libtinfo-dev libsqlite3-dev g++ netbase xz-utils make && \
14+
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v2.1.3/stack-2.1.3-linux-x86_64.tar.gz -o stack.tar.gz && \
15+
echo "c724b207831fe5f06b087bac7e01d33e61a1c9cad6be0468f9c117d383ec5673 stack.tar.gz" | sha256sum -c - && \
16+
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 && \
17+
/usr/local/bin/stack config set system-ghc --global true && \
18+
/usr/local/bin/stack config set install-ghc --global false && \
19+
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz
20+
21+
ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/3.0/bin:/opt/ghc/8.8.1/bin:$PATH
22+
23+
## run ghci by default unless a command is specified
24+
CMD ["ghci"]

8.4/stretch/Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Dockerfile for a haskell environment
2+
FROM buildpack-deps:stretch
3+
4+
## ensure locale is set during build
5+
ENV LANG C.UTF-8
6+
7+
RUN apt-get update && \
8+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git && \
9+
echo 'deb http://downloads.haskell.org/debian stretch main' > /etc/apt/sources.list.d/ghc.list && \
10+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574 && \
11+
apt-get update && \
12+
apt-get install -y --no-install-recommends ghc-8.4.4 cabal-install-3.0 \
13+
libtinfo-dev && \
14+
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v2.1.3/stack-2.1.3-linux-x86_64.tar.gz -o stack.tar.gz && \
15+
echo "c724b207831fe5f06b087bac7e01d33e61a1c9cad6be0468f9c117d383ec5673 stack.tar.gz" | sha256sum -c - && \
16+
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 && \
17+
/usr/local/bin/stack config set system-ghc --global true && \
18+
/usr/local/bin/stack config set install-ghc --global false && \
19+
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz
20+
21+
ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/3.0/bin:/opt/ghc/8.8.1/bin:$PATH
22+
23+
## run ghci by default unless a command is specified
24+
CMD ["ghci"]

8.4/Dockerfile renamed to 8.4/stretch/slim/Dockerfile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,16 @@ RUN apt-get update && \
99
echo 'deb http://downloads.haskell.org/debian stretch main' > /etc/apt/sources.list.d/ghc.list && \
1010
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574 && \
1111
apt-get update && \
12-
apt-get install -y --no-install-recommends ghc-8.4.4 cabal-install-2.4 \
12+
apt-get install -y --no-install-recommends ghc-8.4.4 cabal-install-3.0 \
1313
zlib1g-dev libtinfo-dev libsqlite3-dev g++ netbase xz-utils make && \
14-
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v1.9.1/stack-1.9.1-linux-x86_64.tar.gz -o stack.tar.gz && \
15-
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v1.9.1/stack-1.9.1-linux-x86_64.tar.gz.asc -o stack.tar.gz.asc && \
16-
export GNUPGHOME="$(mktemp -d)" && \
17-
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys C5705533DA4F78D8664B5DC0575159689BEFB442 && \
18-
gpg --batch --verify stack.tar.gz.asc stack.tar.gz && \
14+
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v2.1.3/stack-2.1.3-linux-x86_64.tar.gz -o stack.tar.gz && \
15+
echo "c724b207831fe5f06b087bac7e01d33e61a1c9cad6be0468f9c117d383ec5673 stack.tar.gz" | sha256sum -c - && \
1916
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 && \
2017
/usr/local/bin/stack config set system-ghc --global true && \
2118
/usr/local/bin/stack config set install-ghc --global false && \
22-
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz.asc /stack.tar.gz
19+
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz
2320

24-
ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/2.4/bin:/opt/ghc/8.4.4/bin:$PATH
21+
ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/3.0/bin:/opt/ghc/8.8.1/bin:$PATH
2522

2623
## run ghci by default unless a command is specified
2724
CMD ["ghci"]

8.6/buster/Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Dockerfile for a haskell environment
2+
FROM buildpack-deps:buster
3+
4+
## ensure locale is set during build
5+
ENV LANG C.UTF-8
6+
7+
RUN apt-get update && \
8+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git && \
9+
echo 'deb http://downloads.haskell.org/debian buster main' > /etc/apt/sources.list.d/ghc.list && \
10+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574 && \
11+
apt-get update && \
12+
apt-get install -y --no-install-recommends ghc-8.6.5 cabal-install-3.0 \
13+
libtinfo-dev && \
14+
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v2.1.3/stack-2.1.3-linux-x86_64.tar.gz -o stack.tar.gz && \
15+
echo "c724b207831fe5f06b087bac7e01d33e61a1c9cad6be0468f9c117d383ec5673 stack.tar.gz" | sha256sum -c - && \
16+
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 && \
17+
/usr/local/bin/stack config set system-ghc --global true && \
18+
/usr/local/bin/stack config set install-ghc --global false && \
19+
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz
20+
21+
ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/3.0/bin:/opt/ghc/8.8.1/bin:$PATH
22+
23+
## run ghci by default unless a command is specified
24+
CMD ["ghci"]

8.6/buster/slim/Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Dockerfile for a haskell environment
2+
FROM debian:buster
3+
4+
## ensure locale is set during build
5+
ENV LANG C.UTF-8
6+
7+
RUN apt-get update && \
8+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git && \
9+
echo 'deb http://downloads.haskell.org/debian buster main' > /etc/apt/sources.list.d/ghc.list && \
10+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574 && \
11+
apt-get update && \
12+
apt-get install -y --no-install-recommends ghc-8.6.5 cabal-install-3.0 \
13+
zlib1g-dev libtinfo-dev libsqlite3-dev g++ netbase xz-utils make && \
14+
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v2.1.3/stack-2.1.3-linux-x86_64.tar.gz -o stack.tar.gz && \
15+
echo "c724b207831fe5f06b087bac7e01d33e61a1c9cad6be0468f9c117d383ec5673 stack.tar.gz" | sha256sum -c - && \
16+
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 && \
17+
/usr/local/bin/stack config set system-ghc --global true && \
18+
/usr/local/bin/stack config set install-ghc --global false && \
19+
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz
20+
21+
ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/3.0/bin:/opt/ghc/8.8.1/bin:$PATH
22+
23+
## run ghci by default unless a command is specified
24+
CMD ["ghci"]

8.6/stretch/Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Dockerfile for a haskell environment
2+
FROM buildpack-deps:stretch
3+
4+
## ensure locale is set during build
5+
ENV LANG C.UTF-8
6+
7+
RUN apt-get update && \
8+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git && \
9+
echo 'deb http://downloads.haskell.org/debian stretch main' > /etc/apt/sources.list.d/ghc.list && \
10+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574 && \
11+
apt-get update && \
12+
apt-get install -y --no-install-recommends ghc-8.6.5 cabal-install-3.0 \
13+
libtinfo-dev && \
14+
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v2.1.3/stack-2.1.3-linux-x86_64.tar.gz -o stack.tar.gz && \
15+
echo "c724b207831fe5f06b087bac7e01d33e61a1c9cad6be0468f9c117d383ec5673 stack.tar.gz" | sha256sum -c - && \
16+
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 && \
17+
/usr/local/bin/stack config set system-ghc --global true && \
18+
/usr/local/bin/stack config set install-ghc --global false && \
19+
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz
20+
21+
ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/3.0/bin:/opt/ghc/8.8.1/bin:$PATH
22+
23+
## run ghci by default unless a command is specified
24+
CMD ["ghci"]

8.6/Dockerfile renamed to 8.6/stretch/slim/Dockerfile

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,16 @@ RUN apt-get update && \
99
echo 'deb http://downloads.haskell.org/debian stretch main' > /etc/apt/sources.list.d/ghc.list && \
1010
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574 && \
1111
apt-get update && \
12-
apt-get install -y --no-install-recommends ghc-8.6.5 cabal-install-2.4 \
13-
zlib1g-dev libtinfo-dev libsqlite3-dev g++ netbase xz-utils make openssh-client && \
14-
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v1.9.3/stack-1.9.3-linux-x86_64.tar.gz -o stack.tar.gz && \
15-
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v1.9.3/stack-1.9.3-linux-x86_64.tar.gz.asc -o stack.tar.gz.asc && \
16-
export GNUPGHOME="$(mktemp -d)" && \
17-
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys C5705533DA4F78D8664B5DC0575159689BEFB442 && \
18-
gpg --batch --verify stack.tar.gz.asc stack.tar.gz && \
12+
apt-get install -y --no-install-recommends ghc-8.6.5 cabal-install-3.0 \
13+
zlib1g-dev libtinfo-dev libsqlite3-dev g++ netbase xz-utils make && \
14+
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v2.1.3/stack-2.1.3-linux-x86_64.tar.gz -o stack.tar.gz && \
15+
echo "c724b207831fe5f06b087bac7e01d33e61a1c9cad6be0468f9c117d383ec5673 stack.tar.gz" | sha256sum -c - && \
1916
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 && \
2017
/usr/local/bin/stack config set system-ghc --global true && \
2118
/usr/local/bin/stack config set install-ghc --global false && \
22-
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz.asc /stack.tar.gz
19+
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz
2320

24-
ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/2.4/bin:/opt/ghc/8.6.5/bin:$PATH
21+
ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/3.0/bin:/opt/ghc/8.8.1/bin:$PATH
2522

2623
## run ghci by default unless a command is specified
2724
CMD ["ghci"]

8.8/buster/Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Dockerfile for a haskell environment
2+
FROM buildpack-deps:buster
3+
4+
## ensure locale is set during build
5+
ENV LANG C.UTF-8
6+
7+
RUN apt-get update && \
8+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git && \
9+
echo 'deb http://downloads.haskell.org/debian buster main' > /etc/apt/sources.list.d/ghc.list && \
10+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574 && \
11+
apt-get update && \
12+
apt-get install -y --no-install-recommends ghc-8.8.1 cabal-install-3.0 \
13+
libtinfo-dev && \
14+
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v2.1.3/stack-2.1.3-linux-x86_64.tar.gz -o stack.tar.gz && \
15+
echo "c724b207831fe5f06b087bac7e01d33e61a1c9cad6be0468f9c117d383ec5673 stack.tar.gz" | sha256sum -c - && \
16+
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 && \
17+
/usr/local/bin/stack config set system-ghc --global true && \
18+
/usr/local/bin/stack config set install-ghc --global false && \
19+
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz
20+
21+
ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/3.0/bin:/opt/ghc/8.8.1/bin:$PATH
22+
23+
## run ghci by default unless a command is specified
24+
CMD ["ghci"]

8.8/buster/slim/Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Dockerfile for a haskell environment
2+
FROM debian:buster
3+
4+
## ensure locale is set during build
5+
ENV LANG C.UTF-8
6+
7+
RUN apt-get update && \
8+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git && \
9+
echo 'deb http://downloads.haskell.org/debian buster main' > /etc/apt/sources.list.d/ghc.list && \
10+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574 && \
11+
apt-get update && \
12+
apt-get install -y --no-install-recommends ghc-8.8.1 cabal-install-3.0 \
13+
zlib1g-dev libtinfo-dev libsqlite3-dev g++ netbase xz-utils make && \
14+
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v2.1.3/stack-2.1.3-linux-x86_64.tar.gz -o stack.tar.gz && \
15+
echo "c724b207831fe5f06b087bac7e01d33e61a1c9cad6be0468f9c117d383ec5673 stack.tar.gz" | sha256sum -c - && \
16+
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 && \
17+
/usr/local/bin/stack config set system-ghc --global true && \
18+
/usr/local/bin/stack config set install-ghc --global false && \
19+
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz
20+
21+
ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/3.0/bin:/opt/ghc/8.8.1/bin:$PATH
22+
23+
## run ghci by default unless a command is specified
24+
CMD ["ghci"]

8.8/stretch/Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Dockerfile for a haskell environment
2+
FROM buildpack-deps:stretch
3+
4+
## ensure locale is set during build
5+
ENV LANG C.UTF-8
6+
7+
RUN apt-get update && \
8+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git && \
9+
echo 'deb http://downloads.haskell.org/debian stretch main' > /etc/apt/sources.list.d/ghc.list && \
10+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574 && \
11+
apt-get update && \
12+
apt-get install -y --no-install-recommends ghc-8.8.1 cabal-install-3.0 \
13+
libtinfo-dev && \
14+
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v2.1.3/stack-2.1.3-linux-x86_64.tar.gz -o stack.tar.gz && \
15+
echo "c724b207831fe5f06b087bac7e01d33e61a1c9cad6be0468f9c117d383ec5673 stack.tar.gz" | sha256sum -c - && \
16+
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 && \
17+
/usr/local/bin/stack config set system-ghc --global true && \
18+
/usr/local/bin/stack config set install-ghc --global false && \
19+
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz
20+
21+
ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/3.0/bin:/opt/ghc/8.8.1/bin:$PATH
22+
23+
## run ghci by default unless a command is specified
24+
CMD ["ghci"]

8.8/Dockerfile renamed to 8.8/stretch/slim/Dockerfile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,13 @@ RUN apt-get update && \
1010
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574 && \
1111
apt-get update && \
1212
apt-get install -y --no-install-recommends ghc-8.8.1 cabal-install-3.0 \
13-
zlib1g-dev libtinfo-dev libsqlite3-dev g++ netbase xz-utils make openssh-client && \
13+
zlib1g-dev libtinfo-dev libsqlite3-dev g++ netbase xz-utils make && \
1414
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v2.1.3/stack-2.1.3-linux-x86_64.tar.gz -o stack.tar.gz && \
15-
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v2.1.3/stack-2.1.3-linux-x86_64.tar.gz.asc -o stack.tar.gz.asc && \
16-
export GNUPGHOME="$(mktemp -d)" && \
17-
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys C5705533DA4F78D8664B5DC0575159689BEFB442 && \
18-
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 2C6A674E85EE3FB896AFC9B965101FF31C5C154D && \
19-
gpg --batch --trusted-key 0x575159689BEFB442 --verify stack.tar.gz.asc stack.tar.gz && \
15+
echo "c724b207831fe5f06b087bac7e01d33e61a1c9cad6be0468f9c117d383ec5673 stack.tar.gz" | sha256sum -c - && \
2016
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 && \
2117
/usr/local/bin/stack config set system-ghc --global true && \
2218
/usr/local/bin/stack config set install-ghc --global false && \
23-
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz.asc /stack.tar.gz
19+
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz
2420

2521
ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/3.0/bin:/opt/ghc/8.8.1/bin:$PATH
2622

Dockerfile.template

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## Dockerfile for a haskell environment
2+
{% if slim %}
3+
FROM debian:{{distribution}}
4+
{% else %}
5+
FROM buildpack-deps:{{distribution}}
6+
{% endif %}
7+
8+
## ensure locale is set during build
9+
ENV LANG C.UTF-8
10+
11+
RUN apt-get update && \
12+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git && \
13+
echo 'deb http://downloads.haskell.org/debian {{distribution}} main' > /etc/apt/sources.list.d/ghc.list && \
14+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574 && \
15+
apt-get update && \
16+
apt-get install -y --no-install-recommends ghc-{{ghcVersion}} cabal-install-3.0 \
17+
{% if slim %}
18+
{# See https://github.c om/docker-library/buildpack-deps/blob/master/buster/Dockerfile #}
19+
{# And https://github.com/docker-library/buildpack-deps/blob/master/buster/scm/Dockerfile #}
20+
zlib1g-dev libtinfo-dev libsqlite3-dev g++ netbase xz-utils make && \
21+
{% else %}
22+
libtinfo-dev && \
23+
{% endif %}
24+
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v{{stackVersion}}/stack-{{stackVersion}}-linux-x86_64.tar.gz -o stack.tar.gz && \
25+
echo "{{stackSha256}} stack.tar.gz" | sha256sum -c - && \
26+
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 && \
27+
/usr/local/bin/stack config set system-ghc --global true && \
28+
/usr/local/bin/stack config set install-ghc --global false && \
29+
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz
30+
31+
ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/3.0/bin:/opt/ghc/8.8.1/bin:$PATH
32+
33+
## run ghci by default unless a command is specified
34+
CMD ["ghci"]

0 commit comments

Comments
 (0)