on master help sign in
Migrate dockerfiles from stack
commitd6b16c49a941394e0cfa8f3e576af8967b16a80a authorJeff Happily <goodboy96@live.com.my> dateFri 14 Feb 2020, 11:29 (7 years ago) parentc73c4b9
23 files changed+957
automated/dockerfiles/README.md+36 automated/dockerfiles/build.sh+170 automated/dockerfiles/lts-10.0/Dockerfile+67 automated/dockerfiles/lts-10.1/Dockerfile+3 automated/dockerfiles/lts-10.5/Dockerfile+3 automated/dockerfiles/lts-11.0/Dockerfile+67 automated/dockerfiles/lts-11.22/Dockerfile+3 automated/dockerfiles/lts-11.6/Dockerfile+3 automated/dockerfiles/lts-12.0/Dockerfile+69 automated/dockerfiles/lts-12.13/Dockerfile+3 automated/dockerfiles/lts-12.15/Dockerfile+14 automated/dockerfiles/lts-12.21/Dockerfile+3 automated/dockerfiles/lts-12.26/Dockerfile+89 automated/dockerfiles/lts-13.0/Dockerfile+69 automated/dockerfiles/lts-13.12/Dockerfile+93 automated/dockerfiles/lts-13.20/Dockerfile+93 automated/dockerfiles/lts-13.25/Dockerfile+3 automated/dockerfiles/lts-13.27/Dockerfile+9 automated/dockerfiles/lts-13.3/Dockerfile+10 automated/dockerfiles/lts-14.0/Dockerfile+89 automated/dockerfiles/lts-9.0/Dockerfile+55 automated/dockerfiles/lts-9.20/Dockerfile+3 automated/dockerfiles/lts-9.21/Dockerfile+3
automated/dockerfiles/README.mdnew file+36
@@ -0,0 +1,36 @@
1+dockerfiles/stack-build
2+=======================
3+
4+Build [fpco/stack-build](https://hub.docker.com/r/fpco/stack-build/) Docker
5+images. This script and its Dockerfiles are used for building images for LTS >=
6+8.0.
7+
8+Usage
9+-----
10+
11+ ./build.sh [--push] [--dry-run] [--small] lts-X.Y|lts-X|lts]"
12+
13+Options
14+-------
15+
16+`--help`: show this help
17+
18+`--push`: push the image after building/tagging it
19+
20+`--dry-run`: print the important commands that will be run, but don't actually
21+ run them
22+
23+`--small`: build the small variant of the image
24+
25+Argument
26+---------
27+
28+If you specify and exact LTS version, that image will be built. If you only
29+specify the major version, then an image for the latest minor version for that
30+major version will be built. If you specify 'lts', an image for the latest LTS
31+snapshot is built.
32+
33+This searches for a Dockerfile for the selected snapshot in
34+`lts-X.Y/Dockerfile`, and if one isn't found reuses the same image as built the
35+most recent `lts-X.Y/Dockerfile` found for earlier minor versions of the same
36+major version.
automated/dockerfiles/build.shnew file+170
@@ -0,0 +1,170 @@
1+#!/usr/bin/env bash
2+
3+set -eu
4+cd "$(dirname "$0")"
5+
6+#
7+# Constants and defaults
8+#
9+
10+DOCKER_REPO=fpco/stack-build
11+PUSH=false
12+DRY=false
13+VARIANT=build
14+
15+#
16+# Functions
17+#
18+
19+# Print usage information and exit with failure status. First argument is an
20+# error message.
21+usage() {
22+ echo "$0: $1" >&2
23+ echo
24+ echo "Usage: $0 [--push] [--dry-run] [--small] lts-X.Y|lts-X|lts]"
25+ echo "See README.md for more information."
26+ echo
27+ exit 1
28+}
29+
30+# Print a command, and if --dry-run disabled also run it
31+dry() {
32+ echo ">>> $*"
33+ [[ $DRY = true ]] || "$@"
34+}
35+
36+# Push an image if --push is enabled (otherwise do nothing)
37+push() {
38+ [[ $PUSH = false ]] || dry docker push "$1"
39+}
40+
41+# Tag an image, and then push it if --push is enabled
42+tagpush() {
43+ dry docker tag "$1" "$2"
44+ push "$2"
45+}
46+
47+#
48+# Parse command-line
49+#
50+
51+LTS_SLUG_ARG=
52+while [[ $# -gt 0 ]]; do
53+ case "$1" in
54+ --push)
55+ PUSH=true
56+ shift
57+ ;;
58+ --dry-run)
59+ DRY=true
60+ shift
61+ ;;
62+ --small)
63+ VARIANT=small
64+ DOCKER_REPO=fpco/stack-build-small
65+ shift
66+ ;;
67+ -*)
68+ usage "Unknown option: $1"
69+ ;;
70+ *)
71+ if [[ -n "$LTS_SLUG_ARG" ]]; then
72+ usage "Cannot specify multiple snaphots: $1"
73+ fi
74+ LTS_SLUG_ARG="$1"
75+ shift
76+ ;;
77+ esac
78+done
79+
80+#
81+# Determine actual snapshot version from aliases
82+#
83+
84+SNAPSHOTS="$(mktemp "lts-snapshots.json.XXXXXX")"
85+trap "rm -f \"$SNAPSHOTS\"" EXIT
86+wget -qO- https://www.stackage.org/download/lts-snapshots.json >"$SNAPSHOTS"
87+
88+case "$LTS_SLUG_ARG" in
89+ "")
90+ usage "Missing argument: snapshot or alias"
91+ ;;
92+ lts-*.*)
93+ LTS_SLUG="$LTS_SLUG_ARG"
94+ ;;
95+ *)
96+ LTS_SLUG=$(jq -r ".[\"$LTS_SLUG_ARG\"]" "$SNAPSHOTS")
97+ if [[ -z "$LTS_SLUG" || "$LTS_SLUG" = "null" ]]; then
98+ echo "$0: Cannot find LTS version for slug: $LTS_SLUG_ARG" >&2
99+ exit 1
100+ fi
101+ ;;
102+esac
103+
104+LTS_VERSION="${LTS_SLUG#lts-}"
105+LTS_MAJOR="${LTS_VERSION%.*}"
106+LTS_MINOR="${LTS_VERSION#*.}"
107+
108+#
109+# Determine latest LTS version
110+#
111+
112+LATEST_LTS_SLUG=$(jq -r ".[\"lts\"]" $SNAPSHOTS)
113+LATEST_LTS_VERSION="${LATEST_LTS_SLUG#lts-}"
114+LATEST_LTS_MAJOR="${LATEST_LTS_VERSION%.*}"
115+LATEST_LTS_MINOR="${LATEST_LTS_VERSION#*.}"
116+
117+#
118+# Determine latest minor version of the selected major version
119+#
120+
121+MAJOR_LATEST_LTS_SLUG=$(jq -r ".[\"lts-$LTS_MAJOR\"]" $SNAPSHOTS)
122+MAJOR_LATEST_LTS_VERSION="${MAJOR_LATEST_LTS_SLUG#lts-}"
123+MAJOR_LATEST_LTS_MAJOR="${MAJOR_LATEST_LTS_VERSION%.*}"
124+MAJOR_LATEST_LTS_MINOR="${MAJOR_LATEST_LTS_VERSION#*.}"
125+
126+#
127+# Find the Dockerfile for the selected snapshot
128+#
129+
130+if [[ -s "$LTS_SLUG/Dockerfile" ]]; then
131+
132+ # If there is an exact match, build and push that image
133+
134+ sed "s/\\\$DOCKER_REPO/$(echo $DOCKER_REPO|sed 's/\//\\\//')/g" "$LTS_SLUG/Dockerfile" >"$LTS_SLUG/Dockerfile.sub"
135+ dry docker build -t "$DOCKER_REPO:$LTS_SLUG" --build-arg "DOCKER_REPO=$DOCKER_REPO" --build-arg "LTS_SLUG=$LTS_SLUG" --build-arg "VARIANT=$VARIANT" -f "$LTS_SLUG/Dockerfile.sub" "$LTS_SLUG"
136+ rm -f "$LTS_SLUG/Dockerfile.sub"
137+ push "$DOCKER_REPO:$LTS_SLUG"
138+else
139+
140+ # If no exact match, find a dockerfile for any earlier minor version of the
141+ # selected major version, and just create a new tag from version's image with the selected
142+ # minor version (assuming that nothing needs to change), and push it.
143+
144+ minor=$(( LTS_MINOR - 1 ))
145+ while [[ ! -s "lts-$LTS_MAJOR.$minor/Dockerfile" && $minor -ge 0 ]]; do
146+ minor=$(( minor - 1 ))
147+ done
148+ if [[ $minor -lt 0 ]]; then
149+ echo "$0: Cannot find any Dockerfile for LTS major version" >&2
150+ exit 1
151+ fi
152+ dry docker pull "$DOCKER_REPO:lts-$LTS_MAJOR.$minor" || true
153+ tagpush "$DOCKER_REPO:lts-$LTS_MAJOR.$minor" "$DOCKER_REPO:$LTS_SLUG"
154+fi
155+
156+#
157+# Create and push additional tags
158+#
159+
160+# If we select the latest minor version for the selected major version, then
161+# also create and push an 'lts-X' tag.
162+if [[ "$MAJOR_LATEST_LTS_VERSION" = "$LTS_VERSION" ]]; then
163+ tagpush "$DOCKER_REPO:$LTS_SLUG" "$DOCKER_REPO:lts-$LTS_MAJOR"
164+fi
165+
166+# If we selected the latest LTS snapshot, also create and push the 'lts' and 'latest' tags.
167+if [[ "$LATEST_LTS_VERSION" = "$LTS_VERSION" ]]; then
168+ tagpush "$DOCKER_REPO:$LTS_SLUG" "$DOCKER_REPO:lts"
169+ tagpush "$DOCKER_REPO:$LTS_SLUG" "$DOCKER_REPO:latest"
170+fi
automated/dockerfiles/lts-10.0/Dockerfilenew file+67
@@ -0,0 +1,67 @@
1+FROM ubuntu:16.04
2+
3+MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
4+
5+ARG GHC_VERSION=8.2.2
6+ARG LTS_SLUG=lts-10.0
7+ARG PID1_VERSION=0.1.0.1
8+ARG STACK_VERSION=1.6.3
9+ARG BOOTSTRAP_COMMIT=a8234cb586c3022099a3b0155275ed067df00f72
10+ARG DEBIAN_FRONTEND=noninteractive
11+
12+#
13+# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
14+#
15+
16+ENV LANG=C.UTF-8 \
17+ LC_ALL=C.UTF-8 \
18+ PATH=/root/.cabal/bin:/root/.local/bin:/opt/ghc/$GHC_VERSION/bin:$PATH
19+
20+#
21+# Use Stackage's debian-bootstrap.sh script to install system libraries and
22+# tools required to build any Stackage package.
23+#
24+
25+RUN apt-get update && \
26+ apt-get install -y wget && \
27+ wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | bash && \
28+ rm -rf /var/lib/apt/lists/*
29+
30+#
31+# Create symlink to help tools find GHC documentation
32+#
33+
34+RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
35+
36+#
37+# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
38+# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
39+# files that some of these tools require.
40+#
41+
42+RUN stack --system-ghc --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
43+ cabal-install happy alex cpphs gtk2hs-buildtools hscolour && \
44+ cd $HOME/.stack && \
45+ find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
46+ find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
47+
48+#
49+# Install 'pid1' init daemon
50+#
51+
52+RUN wget -O- "https://github.com/fpco/pid1/releases/download/pid1%2F$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
53+ chown root:root /usr/local/sbin && \
54+ chown root:root /usr/local/sbin/pid1
55+
56+#
57+# Install Stack
58+#
59+
60+RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
61+
62+#
63+# Set up pid1 entrypoint and default command
64+#
65+
66+ENTRYPOINT ["/usr/local/sbin/pid1"]
67+CMD ["bash"]
automated/dockerfiles/lts-10.1/Dockerfilenew file+3
@@ -0,0 +1,3 @@
1+FROM fpco/stack-build:lts-10.0
2+ARG STACK_VERSION=1.6.3
3+RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
automated/dockerfiles/lts-10.5/Dockerfilenew file+3
@@ -0,0 +1,3 @@
1+FROM fpco/stack-build:lts-10.0
2+ARG STACK_VERSION=1.6.5
3+RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
automated/dockerfiles/lts-11.0/Dockerfilenew file+67
@@ -0,0 +1,67 @@
1+FROM ubuntu:16.04
2+
3+MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
4+
5+ARG GHC_VERSION=8.2.2
6+ARG LTS_SLUG=lts-11.0
7+ARG PID1_VERSION=0.1.0.1
8+ARG STACK_VERSION=1.6.5
9+ARG BOOTSTRAP_COMMIT=13ab2b86779c98598e96af7f4c4b9653ba280be5
10+ARG DEBIAN_FRONTEND=noninteractive
11+
12+#
13+# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
14+#
15+
16+ENV LANG=C.UTF-8 \
17+ LC_ALL=C.UTF-8 \
18+ PATH=/root/.cabal/bin:/root/.local/bin:/opt/ghc/$GHC_VERSION/bin:$PATH
19+
20+#
21+# Use Stackage's debian-bootstrap.sh script to install system libraries and
22+# tools required to build any Stackage package.
23+#
24+
25+RUN apt-get update && \
26+ apt-get install -y wget && \
27+ wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | bash && \
28+ rm -rf /var/lib/apt/lists/*
29+
30+#
31+# Create symlink to help tools find GHC documentation
32+#
33+
34+RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
35+
36+#
37+# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
38+# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
39+# files that some of these tools require.
40+#
41+
42+RUN stack --system-ghc --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
43+ cabal-install happy alex cpphs gtk2hs-buildtools hscolour && \
44+ cd $HOME/.stack && \
45+ find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
46+ find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
47+
48+#
49+# Install 'pid1' init daemon
50+#
51+
52+RUN wget -O- "https://github.com/fpco/pid1/releases/download/pid1%2F$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
53+ chown root:root /usr/local/sbin && \
54+ chown root:root /usr/local/sbin/pid1
55+
56+#
57+# Install Stack
58+#
59+
60+RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
61+
62+#
63+# Set up pid1 entrypoint and default command
64+#
65+
66+ENTRYPOINT ["/usr/local/sbin/pid1"]
67+CMD ["bash"]
automated/dockerfiles/lts-11.22/Dockerfilenew file+3
@@ -0,0 +1,3 @@
1+FROM fpco/stack-build:lts-11.6
2+ARG STACK_VERSION=1.9.3
3+RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
automated/dockerfiles/lts-11.6/Dockerfilenew file+3
@@ -0,0 +1,3 @@
1+FROM fpco/stack-build:lts-11.5
2+ARG STACK_VERSION=1.7.1
3+RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
automated/dockerfiles/lts-12.0/Dockerfilenew file+69
@@ -0,0 +1,69 @@
1+FROM ubuntu:16.04
2+
3+MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
4+
5+ARG GHC_VERSION=8.4.3
6+ARG LTS_SLUG=lts-12.0
7+ARG PID1_VERSION=0.1.2.0
8+ARG STACK_VERSION=1.7.1
9+ARG CUDA_VERSION=8.0
10+ARG BOOTSTRAP_COMMIT=56c62ccbf31229ee2b09d3a0b4cd2ad94e7406a8
11+ARG DEBIAN_FRONTEND=noninteractive
12+
13+#
14+# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
15+#
16+
17+ENV LANG=C.UTF-8 \
18+ LC_ALL=C.UTF-8 \
19+ PATH=/root/.cabal/bin:/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:$PATH \
20+ CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
21+ LD_LIBRARY_PATH=/usr/local/cuda-$CUDA_VERSION/lib64:/usr/local/cuda-$CUDA_VERSION/nvvm/lib64
22+#
23+# Use Stackage's debian-bootstrap.sh script to install system libraries and
24+# tools required to build any Stackage package.
25+#
26+
27+RUN apt-get update && \
28+ apt-get install -y wget && \
29+ wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | bash && \
30+ rm -rf /var/lib/apt/lists/*
31+
32+#
33+# Create symlink to help tools find GHC documentation
34+#
35+
36+RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
37+
38+#
39+# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
40+# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
41+# files that some of these tools require.
42+#
43+
44+RUN stack --system-ghc --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
45+ cabal-install happy alex cpphs gtk2hs-buildtools hscolour && \
46+ cd $HOME/.stack && \
47+ find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
48+ find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
49+
50+#
51+# Install 'pid1' init daemon
52+#
53+
54+RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
55+ chown root:root /usr/local/sbin && \
56+ chown root:root /usr/local/sbin/pid1
57+
58+#
59+# Install Stack
60+#
61+
62+RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
63+
64+#
65+# Set up pid1 entrypoint and default command
66+#
67+
68+ENTRYPOINT ["/usr/local/sbin/pid1"]
69+CMD ["bash"]
automated/dockerfiles/lts-12.13/Dockerfilenew file+3
@@ -0,0 +1,3 @@
1+FROM fpco/stack-build:lts-12.0
2+ARG STACK_VERSION=1.9.1
3+RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
automated/dockerfiles/lts-12.15/Dockerfilenew file+14
@@ -0,0 +1,14 @@
1+FROM fpco/stack-build:lts-12.0
2+ARG STACK_VERSION=1.9.1
3+ARG GHC_VERSION=8.4.4
4+RUN apt-get update && \
5+ apt-get install -y \
6+ ghc-$GHC_VERSION \
7+ ghc-$GHC_VERSION-dyn \
8+ ghc-$GHC_VERSION-htmldocs \
9+ ghc-$GHC_VERSION-prof && \
10+ rm -rf /var/lib/apt/lists/*
11+RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
12+RUN ln -s ghc-$GHC_VERSION /opt/ghc/$GHC_VERSION/share/doc/ghc
13+ARG CUDA_VERSION=8.0
14+ENV PATH=/root/.cabal/bin:/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
automated/dockerfiles/lts-12.21/Dockerfilenew file+3
@@ -0,0 +1,3 @@
1+FROM fpco/stack-build:lts-12.15
2+ARG STACK_VERSION=1.9.3
3+RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
automated/dockerfiles/lts-12.26/Dockerfilenew file+89
@@ -0,0 +1,89 @@
1+FROM ubuntu:16.04
2+
3+MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
4+
5+ARG GHC_VERSION=8.4.4
6+ARG LTS_SLUG=lts-12.0
7+ARG PID1_VERSION=0.1.2.0
8+ARG STACK_VERSION=1.9.3
9+ARG CUDA_VERSION=8.0
10+ARG BOOTSTRAP_COMMIT=7f982f63a3734ddb2a7cbbc52b8cec983c496efa
11+ARG DEBIAN_FRONTEND=noninteractive
12+ARG VARIANT=build
13+
14+#
15+# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
16+#
17+
18+ENV LANG=C.UTF-8 \
19+ LC_ALL=C.UTF-8 \
20+ PATH=/root/.cabal/bin:/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:$PATH \
21+ CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
22+ LD_LIBRARY_PATH=/usr/local/cuda-$CUDA_VERSION/lib64:/usr/local/cuda-$CUDA_VERSION/nvvm/lib64
23+#
24+# Use Stackage's debian-bootstrap.sh script to install system libraries and
25+# tools required to build any Stackage package.
26+#
27+
28+RUN apt-get update && \
29+ apt-get install -y --no-install-recommends wget netbase ca-certificates && \
30+ if [ "$VARIANT" = "small" ]; then \
31+ echo "deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list && \
32+ echo "deb-src http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list && \
33+ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 063DAB2BDC0B3F9FCEBC378BFF3AEACEF6F88286 && \
34+ apt-get update && \
35+ apt-get install -y --no-install-recommends \
36+ ghc-$GHC_VERSION ghc-$GHC_VERSION-htmldocs \
37+ g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg \
38+ libtinfo-dev; \
39+ else \
40+ wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | bash; \
41+ fi && \
42+ rm -rf /var/lib/apt/lists/*
43+
44+#
45+# Create symlink to help tools find GHC documentation
46+#
47+
48+RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
49+
50+#
51+# Install Stack
52+#
53+
54+RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
55+
56+#
57+# Configure Stack to use the GHC installed in the Docker image rather than installing its own
58+#
59+
60+RUN mkdir /etc/stack/ && \
61+ echo "system-ghc: true" >/etc/stack/config.yaml
62+
63+#
64+# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
65+# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
66+# files that some of these tools require.
67+#
68+
69+RUN export STACK_ROOT=/usr/local/lib/stack && \
70+ stack --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
71+ cabal-install happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
72+ cd $STACK_ROOT && \
73+ find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
74+ find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
75+
76+#
77+# Install 'pid1' init daemon
78+#
79+
80+RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
81+ chown root:root /usr/local/sbin && \
82+ chown root:root /usr/local/sbin/pid1
83+
84+#
85+# Set up pid1 entrypoint and default command
86+#
87+
88+ENTRYPOINT ["/usr/local/sbin/pid1"]
89+CMD ["bash"]
automated/dockerfiles/lts-13.0/Dockerfilenew file+69
@@ -0,0 +1,69 @@
1+FROM ubuntu:16.04
2+
3+MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
4+
5+ARG GHC_VERSION=8.6.3
6+ARG LTS_SLUG=lts-13.0
7+ARG PID1_VERSION=0.1.2.0
8+ARG STACK_VERSION=1.9.3
9+ARG CUDA_VERSION=10.0
10+ARG BOOTSTRAP_COMMIT=26b29f2862462afd47fb916ed0a2c2a6844ebca9
11+ARG DEBIAN_FRONTEND=noninteractive
12+
13+#
14+# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
15+#
16+
17+ENV LANG=C.UTF-8 \
18+ LC_ALL=C.UTF-8 \
19+ PATH=/root/.cabal/bin:/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:$PATH \
20+ CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
21+ LD_LIBRARY_PATH=/usr/local/cuda-$CUDA_VERSION/lib64:/usr/local/cuda-$CUDA_VERSION/nvvm/lib64
22+#
23+# Use Stackage's debian-bootstrap.sh script to install system libraries and
24+# tools required to build any Stackage package.
25+#
26+
27+RUN apt-get update && \
28+ apt-get install -y wget && \
29+ wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | bash && \
30+ rm -rf /var/lib/apt/lists/*
31+
32+#
33+# Create symlink to help tools find GHC documentation
34+#
35+
36+RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
37+
38+#
39+# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
40+# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
41+# files that some of these tools require.
42+#
43+
44+RUN stack --system-ghc --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
45+ cabal-install happy alex cpphs gtk2hs-buildtools hscolour && \
46+ cd $HOME/.stack && \
47+ find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
48+ find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
49+
50+#
51+# Install 'pid1' init daemon
52+#
53+
54+RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
55+ chown root:root /usr/local/sbin && \
56+ chown root:root /usr/local/sbin/pid1
57+
58+#
59+# Install Stack
60+#
61+
62+RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
63+
64+#
65+# Set up pid1 entrypoint and default command
66+#
67+
68+ENTRYPOINT ["/usr/local/sbin/pid1"]
69+CMD ["bash"]
automated/dockerfiles/lts-13.12/Dockerfilenew file+93
@@ -0,0 +1,93 @@
1+FROM ubuntu:16.04
2+
3+MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
4+
5+ARG GHC_VERSION=8.6.4
6+ARG LTS_SLUG=lts-13.11
7+ARG PID1_VERSION=0.1.2.0
8+ARG STACK_VERSION=1.9.3
9+ARG CUDA_VERSION=10.0
10+ARG BOOTSTRAP_COMMIT=9f2b7ab95c711794257b059604e80ab9ad3c0c45
11+ARG DEBIAN_FRONTEND=noninteractive
12+ARG VARIANT=build
13+
14+#
15+# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
16+#
17+
18+ENV LANG=C.UTF-8 \
19+ LC_ALL=C.UTF-8 \
20+ PATH=/root/.cabal/bin:/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:$PATH \
21+ CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
22+ LD_LIBRARY_PATH=/usr/local/cuda-$CUDA_VERSION/lib64:/usr/local/cuda-$CUDA_VERSION/nvvm/lib64
23+
24+#
25+# Use Stackage's debian-bootstrap.sh script to install system libraries and
26+# tools required to build any Stackage package.
27+#
28+
29+RUN apt-get update && \
30+ apt-get install -y --no-install-recommends wget netbase ca-certificates && \
31+ if [ "$VARIANT" = "small" ]; then \
32+ echo "deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list && \
33+ echo "deb-src http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list && \
34+ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 063DAB2BDC0B3F9FCEBC378BFF3AEACEF6F88286 && \
35+ apt-get update && \
36+ apt-get install -y --no-install-recommends \
37+ ghc-$GHC_VERSION ghc-$GHC_VERSION-htmldocs \
38+ g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg \
39+ libtinfo-dev; \
40+ else \
41+ wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | sed "s/^GHCVER=8.6.3$/GHCVER=$GHC_VERSION/" | bash && \
42+ # Add g++ version required for building 'double-conversion' \
43+ # (see https://github.com/commercialhaskell/stack/issues/4470) \
44+ apt-get install -y g++-7; \
45+ fi && \
46+ rm -rf /var/lib/apt/lists/*
47+
48+#
49+# Create symlink to help tools find GHC documentation
50+#
51+
52+RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
53+
54+#
55+# Install Stack
56+#
57+
58+RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
59+
60+#
61+# Configure Stack to use the GHC installed in the Docker image rather than installing its own
62+#
63+
64+RUN mkdir /etc/stack/ && \
65+ echo "system-ghc: true" >/etc/stack/config.yaml
66+
67+#
68+# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
69+# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
70+# files that some of these tools require.
71+#
72+
73+RUN export STACK_ROOT=/usr/local/lib/stack && \
74+ stack --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
75+ cabal-install happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
76+ cd $STACK_ROOT && \
77+ find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
78+ find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
79+
80+#
81+# Install 'pid1' init daemon
82+#
83+
84+RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
85+ chown root:root /usr/local/sbin && \
86+ chown root:root /usr/local/sbin/pid1
87+
88+#
89+# Set up pid1 entrypoint and default command
90+#
91+
92+ENTRYPOINT ["/usr/local/sbin/pid1"]
93+CMD ["bash"]
automated/dockerfiles/lts-13.20/Dockerfilenew file+93
@@ -0,0 +1,93 @@
1+FROM ubuntu:16.04
2+
3+MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
4+
5+ARG GHC_VERSION=8.6.5
6+ARG LTS_SLUG=lts-13.20
7+ARG PID1_VERSION=0.1.2.0
8+ARG STACK_VERSION=1.9.3
9+ARG CUDA_VERSION=10.0
10+ARG BOOTSTRAP_COMMIT=9f2b7ab95c711794257b059604e80ab9ad3c0c45
11+ARG DEBIAN_FRONTEND=noninteractive
12+ARG VARIANT=build
13+
14+#
15+# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
16+#
17+
18+ENV LANG=C.UTF-8 \
19+ LC_ALL=C.UTF-8 \
20+ PATH=/root/.cabal/bin:/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:$PATH \
21+ CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
22+ LD_LIBRARY_PATH=/usr/local/cuda-$CUDA_VERSION/lib64:/usr/local/cuda-$CUDA_VERSION/nvvm/lib64
23+
24+#
25+# Use Stackage's debian-bootstrap.sh script to install system libraries and
26+# tools required to build any Stackage package.
27+#
28+
29+RUN apt-get update && \
30+ apt-get install -y --no-install-recommends wget netbase ca-certificates && \
31+ if [ "$VARIANT" = "small" ]; then \
32+ echo "deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list && \
33+ echo "deb-src http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list && \
34+ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 063DAB2BDC0B3F9FCEBC378BFF3AEACEF6F88286 && \
35+ apt-get update && \
36+ apt-get install -y --no-install-recommends \
37+ ghc-$GHC_VERSION ghc-$GHC_VERSION-htmldocs \
38+ g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg \
39+ libtinfo-dev; \
40+ else \
41+ wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | sed "s/^GHCVER=8.6.3$/GHCVER=$GHC_VERSION/" | bash && \
42+ # Add g++ version required for building 'double-conversion' \
43+ # (see https://github.com/commercialhaskell/stack/issues/4470) \
44+ apt-get install -y g++-7; \
45+ fi && \
46+ rm -rf /var/lib/apt/lists/*
47+
48+#
49+# Create symlink to help tools find GHC documentation
50+#
51+
52+RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
53+
54+#
55+# Install Stack
56+#
57+
58+RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
59+
60+#
61+# Configure Stack to use the GHC installed in the Docker image rather than installing its own
62+#
63+
64+RUN mkdir /etc/stack/ && \
65+ echo "system-ghc: true" >/etc/stack/config.yaml
66+
67+#
68+# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
69+# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
70+# files that some of these tools require.
71+#
72+
73+RUN export STACK_ROOT=/usr/local/lib/stack && \
74+ stack --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
75+ cabal-install happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
76+ cd $STACK_ROOT && \
77+ find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
78+ find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
79+
80+#
81+# Install 'pid1' init daemon
82+#
83+
84+RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
85+ chown root:root /usr/local/sbin && \
86+ chown root:root /usr/local/sbin/pid1
87+
88+#
89+# Set up pid1 entrypoint and default command
90+#
91+
92+ENTRYPOINT ["/usr/local/sbin/pid1"]
93+CMD ["bash"]
automated/dockerfiles/lts-13.25/Dockerfilenew file+3
@@ -0,0 +1,3 @@
1+FROM $DOCKER_REPO:lts-13.24
2+ARG STACK_VERSION=2.1.1
3+RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
automated/dockerfiles/lts-13.27/Dockerfilenew file+9
@@ -0,0 +1,9 @@
1+FROM $DOCKER_REPO:lts-13.26
2+ARG VARIANT
3+RUN if [ "$VARIANT" = "small" ]; then \
4+ apt-get update && \
5+ apt-get install -y --no-install-recommends sudo && \
6+ rm -rf /var/lib/apt/lists/*; \
7+ fi
8+ARG STACK_VERSION=2.1.3
9+RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64-static.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
automated/dockerfiles/lts-13.3/Dockerfilenew file+10
@@ -0,0 +1,10 @@
1+FROM fpco/stack-build:lts-13.0
2+
3+#
4+# Add g++ version required for building 'double-conversion'
5+# (see https://github.com/commercialhaskell/stack/issues/4470)
6+#
7+
8+RUN apt-get update && \
9+ apt-get install -y g++-7 && \
10+ rm -rf /var/lib/apt/lists/*
automated/dockerfiles/lts-14.0/Dockerfilenew file+89
@@ -0,0 +1,89 @@
1+FROM ubuntu:18.04
2+
3+LABEL maintainer="manny@fpcomplete.com"
4+
5+ARG GHC_VERSION=8.6.5
6+ARG LTS_SLUG=lts-14.0
7+ARG PID1_VERSION=0.1.2.0
8+ARG STACK_VERSION=2.1.3
9+ARG CUDA_VERSION=10.0
10+ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
11+ARG LLVM_VERSION=3.9
12+ARG BOOTSTRAP_COMMIT=d4143f1845f26e8e99d0a1a8134d6ff535ab98b2
13+ARG DEBIAN_FRONTEND=noninteractive
14+ARG VARIANT=build
15+ARG STACK_ROOT=/home/stackage/.stack
16+
17+#
18+# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
19+#
20+
21+ENV LANG=C.UTF-8 \
22+ LC_ALL=C.UTF-8 \
23+ PATH=/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:$STACK_ROOT/programs/x86_64-linux/ghc-$GHC_VERSION/bin:$PATH \
24+ CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
25+ CPATH=$JVM_PATH/include:$JVM_PATH/include/linux:/usr/lib/llvm-$LLVM_VERSION/include
26+
27+#
28+# Install pre-requisites
29+#
30+
31+RUN apt-get update && \
32+ apt-get install -y --no-install-recommends \
33+ wget netbase ca-certificates g++ gcc libc6-dev libffi-dev libgmp-dev \
34+ make xz-utils zlib1g-dev git gnupg libtinfo-dev && \
35+ rm -rf /var/lib/apt/lists/*
36+
37+#
38+# Use Stackage's debian-bootstrap.sh script to install system libraries and
39+# tools required to build any Stackage package.
40+# Re-installs 'stack' *after* running debian-bootstrap.sh since that may have
41+# installed a different version.
42+# In the case of 'small' image, just install Stack and GHC.
43+#
44+
45+RUN if [ "$VARIANT" != "small" ]; then \
46+ wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | sed "s/^GHCVER=8.6.5$/GHCVER=$GHC_VERSION/" | GHCVER=$GHC_VERSION bash; \
47+ fi && \
48+ wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/bin '*/stack' && \
49+ if [ "$VARIANT" = "small" ]; then \
50+ stack setup --resolver ghc-$GHC_VERSION; \
51+ fi && \
52+ rm -rf /var/lib/apt/lists/* && \
53+ cd $STACK_ROOT && \
54+ find . -type f -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
55+ find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
56+
57+#
58+# Configure Stack to use the GHC installed in the Docker image rather than installing its own
59+#
60+
61+RUN mkdir /etc/stack/ && \
62+ echo "system-ghc: true" >/etc/stack/config.yaml
63+
64+#
65+# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
66+# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
67+# files that some of these tools require.
68+#
69+
70+RUN stack --resolver=$LTS_SLUG --local-bin-path=/usr/bin install \
71+ happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
72+ cd $STACK_ROOT && \
73+ find . -type f -not -path './snapshots/*/share/*' -and -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
74+ find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
75+
76+#
77+# Install 'pid1' init daemon
78+#
79+
80+RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
81+ chown root:root /usr/local/sbin && \
82+ chown root:root /usr/local/sbin/pid1
83+
84+#
85+# Set up pid1 entrypoint and default command
86+#
87+
88+ENTRYPOINT ["/usr/local/sbin/pid1"]
89+CMD ["bash"]
automated/dockerfiles/lts-9.0/Dockerfilenew file+55
@@ -0,0 +1,55 @@
1+FROM ubuntu:16.04
2+
3+MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
4+
5+ARG GHC_VERSION=8.0.2
6+ARG LTS_SLUG=lts-9.0
7+ARG PID1_VERSION=0.1.0.1
8+ARG BOOTSTRAP_COMMIT=1bc67bb54eda08c90d8421bc11d257354a379d11
9+ARG DEBIAN_FRONTEND=noninteractive
10+
11+#
12+# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
13+#
14+
15+ENV LANG=C.UTF-8 \
16+ LC_ALL=C.UTF-8 \
17+ PATH=/root/.cabal/bin:/root/.local/bin:/opt/ghc/$GHC_VERSION/bin:$PATH
18+
19+#
20+# Use Stackage's debian-bootstrap.sh script to install system libraries and
21+# tools required to build any Stackage package.
22+#
23+
24+RUN apt-get update && \
25+ apt-get install -y wget && \
26+ wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | bash && \
27+ ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION && \
28+ rm -rf /var/lib/apt/lists/*
29+
30+#
31+# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
32+# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
33+# files that some of these tools require.
34+#
35+
36+RUN stack --system-ghc --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
37+ cabal-install happy alex cpphs gtk2hs-buildtools hscolour && \
38+ cd $HOME/.stack && \
39+ find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
40+ find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
41+
42+#
43+# Install proper 'pid1' init daemon
44+#
45+
46+RUN wget -O- "https://github.com/fpco/pid1/releases/download/pid1%2F$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
47+ chown root:root /usr/local/sbin && \
48+ chown root:root /usr/local/sbin/pid1
49+
50+#
51+# Set up pid1 entrypoint and default command
52+#
53+
54+ENTRYPOINT ["/usr/local/sbin/pid1"]
55+CMD ["bash"]
automated/dockerfiles/lts-9.20/Dockerfilenew file+3
@@ -0,0 +1,3 @@
1+FROM fpco/stack-build:lts-9.0
2+ARG STACK_VERSION=1.6.1
3+RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
automated/dockerfiles/lts-9.21/Dockerfilenew file+3
@@ -0,0 +1,3 @@
1+FROM fpco/stack-build:lts-9.0
2+ARG STACK_VERSION=1.6.5
3+RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'