Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stack 1.9.3 to v2 image #3

Merged
merged 2 commits into from
Dec 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
| 2018-03-12 | v1 | 1.6.5 |
| 2018-05-23 | v2 | 1.7.1 |
| 2018-10-10 | v2 | 1.9.0.1-prerelease |
| 2018-12-20 | v2 | 1.9.3 |


## Versioning
When making updates to this repo, if the contents of the docker image, besides the stack version, change, the image version should be updated. The stack version within a particular docker image, does not necessitate an image version bump. Additionally, any particular stack version could be used within multiple image versions.
30 changes: 30 additions & 0 deletions v2/1.9.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Dockerfile for a haskell environment
FROM debian:stretch-20180312

ENV STACK_VERSION 1.9.3

## ensure locale is set during build
ENV LANG C.UTF-8

RUN apt-get update && \
apt-get install -y procps curl gnupg2 ca-certificates g++ libgmp-dev libncurses-dev make xz-utils git zlib1g-dev && \
# fetch stack and the gpg sig
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64-static.tar.gz -o stack.tar.gz && \
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64-static.tar.gz.asc -o stack.tar.gz.asc && \
# setup gpg and get keys
export GNUPGHOME="$(mktemp -d)" && \
gpg --batch --keyserver ipv4.pool.sks-keyservers.net --recv-keys C5705533DA4F78D8664B5DC0575159689BEFB442 && \
# verify stack signature
gpg --batch --verify stack.tar.gz.asc stack.tar.gz && \
# we're done with curl and gnupg2 so purge them
apt-get purge -y --auto-remove curl gnupg2 && \
# extract stack and install it
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 && \
# cleanup after ourselves and trim the image some
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz.asc /stack.tar.gz /usr/share/doc/* /usr/share/man/* /usr/local/share/doc/* /usr/local/share/man/* && \
apt-get clean

ENV PATH /root/.local/bin:$PATH
ENV STACK_ROOT=/stack-root

CMD ["stack"]