Last active
November 29, 2019 11:30
-
-
Save chrisdone/99a565041d8e751a2b6de2f06dc7c9d3 to your computer and use it in GitHub Desktop.
Testing stack master
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:9-slim | |
MAINTAINER Chris Done | |
################################################################################ | |
# Haskell system dependencies (basically never changes) | |
RUN apt-get update && \ | |
apt-get install -yq --no-install-suggests --no-install-recommends --force-yes -y -qq \ | |
netbase git ca-certificates xz-utils build-essential curl unzip libgmp-dev | |
################################################################################ | |
# Download a specific Stack version | |
RUN curl https://github.com/commercialhaskell/stack/releases/download/v2.1.3/stack-2.1.3-linux-x86_64-static.tar.gz \ | |
--silent -L \ | |
-o stack.tar.gz && \ | |
tar zxf stack.tar.gz && mv stack-2.1.3-linux-x86_64-static/stack /usr/bin/ | |
################################################################################ | |
# Clone a base repo, this determines the LTS and GHC version | |
RUN curl --silent https://github.com/commercialhaskell/stack/archive/beaab04f00be65657c28ae3eb2943dc3a5701821.zip -L \ | |
-o stack.zip && unzip stack.zip -d stack && rm stack.zip && mv stack/stack-* stack/stack | |
WORKDIR stack/stack | |
################################################################################ | |
# Install the right GHC version and update package index | |
RUN stack setup && stack update | |
################################################################################ | |
# Install the snapshot and system dependencies | |
RUN apt-get install -y libz-dev libicu-dev | |
RUN stack build --only-snapshot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM stack-build | |
WORKDIR stack/stack | |
RUN stack install --fast && \ | |
rm -rf /root/.stack && \ | |
mv /root/.local/bin/stack /usr/local/bin/stack |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM stack-deploy | |
RUN curl --silent https://github.com/yesodweb/yesod/archive/d5f6fbba8bcabd01a64eaf48e140a91bdb69d230.zip -L \ | |
-o yesod.zip && unzip yesod.zip -d yesod && rm yesod.zip && mv yesod/yesod-* yesod/yesod | |
WORKDIR yesod/yesod | |
RUN stack setup | |
RUN apt-get install -y moreutils | |
RUN date; stack build -v --dry-run --prefetch 2>&1 | ts "%b %d %H:%M:%.S" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:9-slim | |
MAINTAINER Chris Done | |
################################################################################ | |
# Haskell system dependencies (basically never changes) | |
RUN apt-get update && \ | |
apt-get install -yq --no-install-suggests --no-install-recommends --force-yes -y -qq \ | |
netbase git ca-certificates xz-utils build-essential curl unzip libgmp-dev | |
################################################################################ | |
# Download a specific Stack version | |
RUN curl https://github.com/commercialhaskell/stack/releases/download/v2.1.3/stack-2.1.3-linux-x86_64-static.tar.gz \ | |
--silent -L \ | |
-o stack.tar.gz && \ | |
tar zxf stack.tar.gz && mv stack-2.1.3-linux-x86_64-static/stack /usr/bin/ | |
################################################################################ | |
# Grab and dry-run prefetch yesod | |
RUN curl --silent https://github.com/yesodweb/yesod/archive/d5f6fbba8bcabd01a64eaf48e140a91bdb69d230.zip -L \ | |
-o yesod.zip && unzip yesod.zip -d yesod && rm yesod.zip && mv yesod/yesod-* yesod/yesod | |
WORKDIR yesod/yesod | |
RUN stack setup | |
RUN apt-get install -y moreutils | |
RUN date; stack build -v --dry-run --prefetch 2>&1 | ts "%b %d %H:%M:%.S" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM stack-deploy | |
RUN curl --silent https://github.com/yesodweb/yesod/archive/d5f6fbba8bcabd01a64eaf48e140a91bdb69d230.zip -L \ | |
-o yesod.zip && unzip yesod.zip -d yesod && rm yesod.zip && mv yesod/yesod-* yesod/yesod | |
WORKDIR yesod/yesod | |
RUN stack build -v --fast |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment