Skip to content

Commit 2ffed2e

Browse files
committed
Add ARM64 for stack
1 parent 24791bb commit 2ffed2e

File tree

8 files changed

+136
-184
lines changed

8 files changed

+136
-184
lines changed

8.10/buster/Dockerfile

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,39 +15,33 @@ ARG STACK_RELEASE_KEY=C5705533DA4F78D8664B5DC0575159689BEFB442
1515
RUN set -eux; \
1616
cd /tmp; \
1717
ARCH="$(dpkg-architecture --query DEB_BUILD_GNU_CPU)"; \
18-
INSTALL_STACK="true"; \
1918
STACK_URL="https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz"; \
2019
# sha256 from https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz.sha256
2120
case "$ARCH" in \
2221
'aarch64') \
23-
# Stack does not officially support ARM64, nor do the binaries that exist work.
24-
# Hitting https://github.com/commercialhaskell/stack/issues/2103#issuecomment-972329065 when trying to use
25-
# stack-2.7.1-linux-aarch64.tar.gz
26-
INSTALL_STACK="false"; \
22+
STACK_SHA256='741cf6552adcd41ca0c38c4f03b1e8f244873d988f70ef5ed4b502c0df28ea5a'; \
2723
;; \
2824
'x86_64') \
2925
STACK_SHA256='0581cebe880b8ed47556ee73d8bbb9d602b5b82e38f89f6aa53acaec37e7760d'; \
3026
;; \
3127
*) echo >&2 "error: unsupported architecture '$ARCH'" ; exit 1 ;; \
3228
esac; \
33-
if [ "$INSTALL_STACK" = "true" ]; then \
34-
curl -sSL "$STACK_URL" -o stack.tar.gz; \
35-
echo "$STACK_SHA256 stack.tar.gz" | sha256sum --strict --check; \
36-
\
37-
curl -sSL "$STACK_URL.asc" -o stack.tar.gz.asc; \
38-
GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
39-
gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$STACK_RELEASE_KEY"; \
40-
gpg --batch --verify stack.tar.gz.asc stack.tar.gz; \
41-
gpgconf --kill all; \
42-
\
43-
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 "stack-$STACK-linux-$ARCH/stack"; \
44-
stack config set system-ghc --global true; \
45-
stack config set install-ghc --global false; \
46-
\
47-
rm -rf /tmp/*; \
48-
\
49-
stack --version; \
50-
fi
29+
curl -sSL "$STACK_URL" -o stack.tar.gz; \
30+
echo "$STACK_SHA256 stack.tar.gz" | sha256sum --strict --check; \
31+
\
32+
curl -sSL "$STACK_URL.asc" -o stack.tar.gz.asc; \
33+
GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
34+
gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$STACK_RELEASE_KEY"; \
35+
gpg --batch --verify stack.tar.gz.asc stack.tar.gz; \
36+
gpgconf --kill all; \
37+
\
38+
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 "stack-$STACK-linux-$ARCH/stack"; \
39+
stack config set system-ghc --global true; \
40+
stack config set install-ghc --global false; \
41+
\
42+
rm -rf /tmp/*; \
43+
\
44+
stack --version
5145

5246
ARG CABAL_INSTALL=3.8.1.0
5347
ARG CABAL_INSTALL_RELEASE_KEY=E9EC5616017C3EE26B33468CCE1ED8AE0B011D8C

8.10/slim-buster/Dockerfile

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,39 +29,33 @@ ARG STACK_RELEASE_KEY=C5705533DA4F78D8664B5DC0575159689BEFB442
2929
RUN set -eux; \
3030
cd /tmp; \
3131
ARCH="$(dpkg-architecture --query DEB_BUILD_GNU_CPU)"; \
32-
INSTALL_STACK="true"; \
3332
STACK_URL="https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz"; \
3433
# sha256 from https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz.sha256
3534
case "$ARCH" in \
3635
'aarch64') \
37-
# Stack does not officially support ARM64, nor do the binaries that exist work.
38-
# Hitting https://github.com/commercialhaskell/stack/issues/2103#issuecomment-972329065 when trying to use
39-
# stack-2.7.1-linux-aarch64.tar.gz
40-
INSTALL_STACK="false"; \
36+
STACK_SHA256='741cf6552adcd41ca0c38c4f03b1e8f244873d988f70ef5ed4b502c0df28ea5a'; \
4137
;; \
4238
'x86_64') \
4339
STACK_SHA256='0581cebe880b8ed47556ee73d8bbb9d602b5b82e38f89f6aa53acaec37e7760d'; \
4440
;; \
4541
*) echo >&2 "error: unsupported architecture '$ARCH'" ; exit 1 ;; \
4642
esac; \
47-
if [ "$INSTALL_STACK" = "true" ]; then \
48-
curl -sSL "$STACK_URL" -o stack.tar.gz; \
49-
echo "$STACK_SHA256 stack.tar.gz" | sha256sum --strict --check; \
50-
\
51-
curl -sSL "$STACK_URL.asc" -o stack.tar.gz.asc; \
52-
GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
53-
gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$STACK_RELEASE_KEY"; \
54-
gpg --batch --verify stack.tar.gz.asc stack.tar.gz; \
55-
gpgconf --kill all; \
56-
\
57-
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 "stack-$STACK-linux-$ARCH/stack"; \
58-
stack config set system-ghc --global true; \
59-
stack config set install-ghc --global false; \
60-
\
61-
rm -rf /tmp/*; \
62-
\
63-
stack --version; \
64-
fi
43+
curl -sSL "$STACK_URL" -o stack.tar.gz; \
44+
echo "$STACK_SHA256 stack.tar.gz" | sha256sum --strict --check; \
45+
\
46+
curl -sSL "$STACK_URL.asc" -o stack.tar.gz.asc; \
47+
GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
48+
gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$STACK_RELEASE_KEY"; \
49+
gpg --batch --verify stack.tar.gz.asc stack.tar.gz; \
50+
gpgconf --kill all; \
51+
\
52+
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 "stack-$STACK-linux-$ARCH/stack"; \
53+
stack config set system-ghc --global true; \
54+
stack config set install-ghc --global false; \
55+
\
56+
rm -rf /tmp/*; \
57+
\
58+
stack --version
6559

6660
ARG CABAL_INSTALL=3.8.1.0
6761
ARG CABAL_INSTALL_RELEASE_KEY=E9EC5616017C3EE26B33468CCE1ED8AE0B011D8C

9.0/buster/Dockerfile

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,39 +15,33 @@ ARG STACK_RELEASE_KEY=C5705533DA4F78D8664B5DC0575159689BEFB442
1515
RUN set -eux; \
1616
cd /tmp; \
1717
ARCH="$(dpkg-architecture --query DEB_BUILD_GNU_CPU)"; \
18-
INSTALL_STACK="true"; \
1918
STACK_URL="https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz"; \
2019
# sha256 from https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz.sha256
2120
case "$ARCH" in \
2221
'aarch64') \
23-
# Stack does not officially support ARM64, nor do the binaries that exist work.
24-
# Hitting https://github.com/commercialhaskell/stack/issues/2103#issuecomment-972329065 when trying to use
25-
# stack-2.7.1-linux-aarch64.tar.gz
26-
INSTALL_STACK="false"; \
22+
STACK_SHA256='741cf6552adcd41ca0c38c4f03b1e8f244873d988f70ef5ed4b502c0df28ea5a'; \
2723
;; \
2824
'x86_64') \
2925
STACK_SHA256='0581cebe880b8ed47556ee73d8bbb9d602b5b82e38f89f6aa53acaec37e7760d'; \
3026
;; \
3127
*) echo >&2 "error: unsupported architecture '$ARCH'" ; exit 1 ;; \
3228
esac; \
33-
if [ "$INSTALL_STACK" = "true" ]; then \
34-
curl -sSL "$STACK_URL" -o stack.tar.gz; \
35-
echo "$STACK_SHA256 stack.tar.gz" | sha256sum --strict --check; \
36-
\
37-
curl -sSL "$STACK_URL.asc" -o stack.tar.gz.asc; \
38-
GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
39-
gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$STACK_RELEASE_KEY"; \
40-
gpg --batch --verify stack.tar.gz.asc stack.tar.gz; \
41-
gpgconf --kill all; \
42-
\
43-
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 "stack-$STACK-linux-$ARCH/stack"; \
44-
stack config set system-ghc --global true; \
45-
stack config set install-ghc --global false; \
46-
\
47-
rm -rf /tmp/*; \
48-
\
49-
stack --version; \
50-
fi
29+
curl -sSL "$STACK_URL" -o stack.tar.gz; \
30+
echo "$STACK_SHA256 stack.tar.gz" | sha256sum --strict --check; \
31+
\
32+
curl -sSL "$STACK_URL.asc" -o stack.tar.gz.asc; \
33+
GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
34+
gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$STACK_RELEASE_KEY"; \
35+
gpg --batch --verify stack.tar.gz.asc stack.tar.gz; \
36+
gpgconf --kill all; \
37+
\
38+
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 "stack-$STACK-linux-$ARCH/stack"; \
39+
stack config set system-ghc --global true; \
40+
stack config set install-ghc --global false; \
41+
\
42+
rm -rf /tmp/*; \
43+
\
44+
stack --version
5145

5246
ARG CABAL_INSTALL=3.8.1.0
5347
ARG CABAL_INSTALL_RELEASE_KEY=E9EC5616017C3EE26B33468CCE1ED8AE0B011D8C

9.0/slim-buster/Dockerfile

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,39 +29,33 @@ ARG STACK_RELEASE_KEY=C5705533DA4F78D8664B5DC0575159689BEFB442
2929
RUN set -eux; \
3030
cd /tmp; \
3131
ARCH="$(dpkg-architecture --query DEB_BUILD_GNU_CPU)"; \
32-
INSTALL_STACK="true"; \
3332
STACK_URL="https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz"; \
3433
# sha256 from https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz.sha256
3534
case "$ARCH" in \
3635
'aarch64') \
37-
# Stack does not officially support ARM64, nor do the binaries that exist work.
38-
# Hitting https://github.com/commercialhaskell/stack/issues/2103#issuecomment-972329065 when trying to use
39-
# stack-2.7.1-linux-aarch64.tar.gz
40-
INSTALL_STACK="false"; \
36+
STACK_SHA256='741cf6552adcd41ca0c38c4f03b1e8f244873d988f70ef5ed4b502c0df28ea5a'; \
4137
;; \
4238
'x86_64') \
4339
STACK_SHA256='0581cebe880b8ed47556ee73d8bbb9d602b5b82e38f89f6aa53acaec37e7760d'; \
4440
;; \
4541
*) echo >&2 "error: unsupported architecture '$ARCH'" ; exit 1 ;; \
4642
esac; \
47-
if [ "$INSTALL_STACK" = "true" ]; then \
48-
curl -sSL "$STACK_URL" -o stack.tar.gz; \
49-
echo "$STACK_SHA256 stack.tar.gz" | sha256sum --strict --check; \
50-
\
51-
curl -sSL "$STACK_URL.asc" -o stack.tar.gz.asc; \
52-
GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
53-
gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$STACK_RELEASE_KEY"; \
54-
gpg --batch --verify stack.tar.gz.asc stack.tar.gz; \
55-
gpgconf --kill all; \
56-
\
57-
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 "stack-$STACK-linux-$ARCH/stack"; \
58-
stack config set system-ghc --global true; \
59-
stack config set install-ghc --global false; \
60-
\
61-
rm -rf /tmp/*; \
62-
\
63-
stack --version; \
64-
fi
43+
curl -sSL "$STACK_URL" -o stack.tar.gz; \
44+
echo "$STACK_SHA256 stack.tar.gz" | sha256sum --strict --check; \
45+
\
46+
curl -sSL "$STACK_URL.asc" -o stack.tar.gz.asc; \
47+
GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
48+
gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$STACK_RELEASE_KEY"; \
49+
gpg --batch --verify stack.tar.gz.asc stack.tar.gz; \
50+
gpgconf --kill all; \
51+
\
52+
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 "stack-$STACK-linux-$ARCH/stack"; \
53+
stack config set system-ghc --global true; \
54+
stack config set install-ghc --global false; \
55+
\
56+
rm -rf /tmp/*; \
57+
\
58+
stack --version
6559

6660
ARG CABAL_INSTALL=3.8.1.0
6761
ARG CABAL_INSTALL_RELEASE_KEY=E9EC5616017C3EE26B33468CCE1ED8AE0B011D8C

9.2/buster/Dockerfile

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,39 +15,33 @@ ARG STACK_RELEASE_KEY=C5705533DA4F78D8664B5DC0575159689BEFB442
1515
RUN set -eux; \
1616
cd /tmp; \
1717
ARCH="$(dpkg-architecture --query DEB_BUILD_GNU_CPU)"; \
18-
INSTALL_STACK="true"; \
1918
STACK_URL="https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz"; \
2019
# sha256 from https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz.sha256
2120
case "$ARCH" in \
2221
'aarch64') \
23-
# Stack does not officially support ARM64, nor do the binaries that exist work.
24-
# Hitting https://github.com/commercialhaskell/stack/issues/2103#issuecomment-972329065 when trying to use
25-
# stack-2.7.1-linux-aarch64.tar.gz
26-
INSTALL_STACK="false"; \
22+
STACK_SHA256='741cf6552adcd41ca0c38c4f03b1e8f244873d988f70ef5ed4b502c0df28ea5a'; \
2723
;; \
2824
'x86_64') \
2925
STACK_SHA256='0581cebe880b8ed47556ee73d8bbb9d602b5b82e38f89f6aa53acaec37e7760d'; \
3026
;; \
3127
*) echo >&2 "error: unsupported architecture '$ARCH'" ; exit 1 ;; \
3228
esac; \
33-
if [ "$INSTALL_STACK" = "true" ]; then \
34-
curl -sSL "$STACK_URL" -o stack.tar.gz; \
35-
echo "$STACK_SHA256 stack.tar.gz" | sha256sum --strict --check; \
36-
\
37-
curl -sSL "$STACK_URL.asc" -o stack.tar.gz.asc; \
38-
GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
39-
gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$STACK_RELEASE_KEY"; \
40-
gpg --batch --verify stack.tar.gz.asc stack.tar.gz; \
41-
gpgconf --kill all; \
42-
\
43-
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 "stack-$STACK-linux-$ARCH/stack"; \
44-
stack config set system-ghc --global true; \
45-
stack config set install-ghc --global false; \
46-
\
47-
rm -rf /tmp/*; \
48-
\
49-
stack --version; \
50-
fi
29+
curl -sSL "$STACK_URL" -o stack.tar.gz; \
30+
echo "$STACK_SHA256 stack.tar.gz" | sha256sum --strict --check; \
31+
\
32+
curl -sSL "$STACK_URL.asc" -o stack.tar.gz.asc; \
33+
GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
34+
gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$STACK_RELEASE_KEY"; \
35+
gpg --batch --verify stack.tar.gz.asc stack.tar.gz; \
36+
gpgconf --kill all; \
37+
\
38+
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 "stack-$STACK-linux-$ARCH/stack"; \
39+
stack config set system-ghc --global true; \
40+
stack config set install-ghc --global false; \
41+
\
42+
rm -rf /tmp/*; \
43+
\
44+
stack --version
5145

5246
ARG CABAL_INSTALL=3.8.1.0
5347
ARG CABAL_INSTALL_RELEASE_KEY=E9EC5616017C3EE26B33468CCE1ED8AE0B011D8C

9.2/slim-buster/Dockerfile

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,39 +29,33 @@ ARG STACK_RELEASE_KEY=C5705533DA4F78D8664B5DC0575159689BEFB442
2929
RUN set -eux; \
3030
cd /tmp; \
3131
ARCH="$(dpkg-architecture --query DEB_BUILD_GNU_CPU)"; \
32-
INSTALL_STACK="true"; \
3332
STACK_URL="https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz"; \
3433
# sha256 from https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz.sha256
3534
case "$ARCH" in \
3635
'aarch64') \
37-
# Stack does not officially support ARM64, nor do the binaries that exist work.
38-
# Hitting https://github.com/commercialhaskell/stack/issues/2103#issuecomment-972329065 when trying to use
39-
# stack-2.7.1-linux-aarch64.tar.gz
40-
INSTALL_STACK="false"; \
36+
STACK_SHA256='741cf6552adcd41ca0c38c4f03b1e8f244873d988f70ef5ed4b502c0df28ea5a'; \
4137
;; \
4238
'x86_64') \
4339
STACK_SHA256='0581cebe880b8ed47556ee73d8bbb9d602b5b82e38f89f6aa53acaec37e7760d'; \
4440
;; \
4541
*) echo >&2 "error: unsupported architecture '$ARCH'" ; exit 1 ;; \
4642
esac; \
47-
if [ "$INSTALL_STACK" = "true" ]; then \
48-
curl -sSL "$STACK_URL" -o stack.tar.gz; \
49-
echo "$STACK_SHA256 stack.tar.gz" | sha256sum --strict --check; \
50-
\
51-
curl -sSL "$STACK_URL.asc" -o stack.tar.gz.asc; \
52-
GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
53-
gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$STACK_RELEASE_KEY"; \
54-
gpg --batch --verify stack.tar.gz.asc stack.tar.gz; \
55-
gpgconf --kill all; \
56-
\
57-
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 "stack-$STACK-linux-$ARCH/stack"; \
58-
stack config set system-ghc --global true; \
59-
stack config set install-ghc --global false; \
60-
\
61-
rm -rf /tmp/*; \
62-
\
63-
stack --version; \
64-
fi
43+
curl -sSL "$STACK_URL" -o stack.tar.gz; \
44+
echo "$STACK_SHA256 stack.tar.gz" | sha256sum --strict --check; \
45+
\
46+
curl -sSL "$STACK_URL.asc" -o stack.tar.gz.asc; \
47+
GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
48+
gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$STACK_RELEASE_KEY"; \
49+
gpg --batch --verify stack.tar.gz.asc stack.tar.gz; \
50+
gpgconf --kill all; \
51+
\
52+
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 "stack-$STACK-linux-$ARCH/stack"; \
53+
stack config set system-ghc --global true; \
54+
stack config set install-ghc --global false; \
55+
\
56+
rm -rf /tmp/*; \
57+
\
58+
stack --version
6559

6660
ARG CABAL_INSTALL=3.8.1.0
6761
ARG CABAL_INSTALL_RELEASE_KEY=E9EC5616017C3EE26B33468CCE1ED8AE0B011D8C

9.4/buster/Dockerfile

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,39 +15,33 @@ ARG STACK_RELEASE_KEY=C5705533DA4F78D8664B5DC0575159689BEFB442
1515
RUN set -eux; \
1616
cd /tmp; \
1717
ARCH="$(dpkg-architecture --query DEB_BUILD_GNU_CPU)"; \
18-
INSTALL_STACK="true"; \
1918
STACK_URL="https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz"; \
2019
# sha256 from https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz.sha256
2120
case "$ARCH" in \
2221
'aarch64') \
23-
# Stack does not officially support ARM64, nor do the binaries that exist work.
24-
# Hitting https://github.com/commercialhaskell/stack/issues/2103#issuecomment-972329065 when trying to use
25-
# stack-2.7.1-linux-aarch64.tar.gz
26-
INSTALL_STACK="false"; \
22+
STACK_SHA256='741cf6552adcd41ca0c38c4f03b1e8f244873d988f70ef5ed4b502c0df28ea5a'; \
2723
;; \
2824
'x86_64') \
2925
STACK_SHA256='0581cebe880b8ed47556ee73d8bbb9d602b5b82e38f89f6aa53acaec37e7760d'; \
3026
;; \
3127
*) echo >&2 "error: unsupported architecture '$ARCH'" ; exit 1 ;; \
3228
esac; \
33-
if [ "$INSTALL_STACK" = "true" ]; then \
34-
curl -sSL "$STACK_URL" -o stack.tar.gz; \
35-
echo "$STACK_SHA256 stack.tar.gz" | sha256sum --strict --check; \
36-
\
37-
curl -sSL "$STACK_URL.asc" -o stack.tar.gz.asc; \
38-
GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
39-
gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$STACK_RELEASE_KEY"; \
40-
gpg --batch --verify stack.tar.gz.asc stack.tar.gz; \
41-
gpgconf --kill all; \
42-
\
43-
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 "stack-$STACK-linux-$ARCH/stack"; \
44-
stack config set system-ghc --global true; \
45-
stack config set install-ghc --global false; \
46-
\
47-
rm -rf /tmp/*; \
48-
\
49-
stack --version; \
50-
fi
29+
curl -sSL "$STACK_URL" -o stack.tar.gz; \
30+
echo "$STACK_SHA256 stack.tar.gz" | sha256sum --strict --check; \
31+
\
32+
curl -sSL "$STACK_URL.asc" -o stack.tar.gz.asc; \
33+
GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
34+
gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$STACK_RELEASE_KEY"; \
35+
gpg --batch --verify stack.tar.gz.asc stack.tar.gz; \
36+
gpgconf --kill all; \
37+
\
38+
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 "stack-$STACK-linux-$ARCH/stack"; \
39+
stack config set system-ghc --global true; \
40+
stack config set install-ghc --global false; \
41+
\
42+
rm -rf /tmp/*; \
43+
\
44+
stack --version
5145

5246
ARG CABAL_INSTALL=3.8.1.0
5347
ARG CABAL_INSTALL_RELEASE_KEY=E9EC5616017C3EE26B33468CCE1ED8AE0B011D8C

0 commit comments

Comments
 (0)