-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Stack.Dockerfile
21 lines (16 loc) · 808 Bytes
/
Stack.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
ARG GHC_VERSION
ARG STACK_VERSION
ARG STACK_VERSION_UPDATE=${STACK_VERSION}
FROM glcr.b-data.ch/ghc/ghc-musl:${GHC_VERSION}
ARG STACK_VERSION_UPDATE
ARG PREFIX=/usr/local
ENV STACK_VERSION=${STACK_VERSION_UPDATE}
## Install Stack
RUN cd /tmp \
&& curl -sSLO https://github.com/commercialhaskell/stack/releases/download/v"$STACK_VERSION"/stack-"$STACK_VERSION"-linux-"$(uname -m)".tar.gz \
&& curl -sSLO https://github.com/commercialhaskell/stack/releases/download/v"$STACK_VERSION"/stack-"$STACK_VERSION"-linux-"$(uname -m)".tar.gz.sha256 \
&& sha256sum -cs stack-"$STACK_VERSION"-linux-"$(uname -m)".tar.gz.sha256 \
&& tar -xzf stack-"$STACK_VERSION"-linux-"$(uname -m)".tar.gz \
&& mv stack-"$STACK_VERSION"-linux-"$(uname -m)"/stack "$PREFIX/bin/stack" \
## Clean up
&& rm -rf /tmp/*