Skip to content

Commit

Permalink
etc/dockerfiles/stack-build: add lts-10 and remove lts-8
Browse files Browse the repository at this point in the history
  • Loading branch information
borsboom committed Dec 22, 2017
1 parent 6842dca commit 57c974b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ build:
- (cd etc/scripts && stack --install-ghc install --pedantic)
- stack-release-script check

docker_image_lts-8:
docker_image_lts-9:
stage: build
when: manual
script:
- docker login -u "$PROD_DOCKER_USERNAME" -p "$PROD_DOCKER_PASSWORD"
- etc/dockerfiles/stack-build/build.sh --push lts-8
- etc/dockerfiles/stack-build/build.sh --push lts-9

docker_image_lts-9:
docker_image_lts-10:
stage: build
when: manual
script:
- docker login -u "$PROD_DOCKER_USERNAME" -p "$PROD_DOCKER_PASSWORD"
- etc/dockerfiles/stack-build/build.sh --push lts-9
- etc/dockerfiles/stack-build/build.sh --push lts-10
2 changes: 1 addition & 1 deletion etc/dockerfiles/stack-build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ if [[ -s "$LTS_SLUG/Dockerfile" ]]; then
else

# If no exact match, find a dockerfile for any earlier minor version of the
# selected major version, and just create a new tag rom version's image with the selected
# selected major version, and just create a new tag from version's image with the selected
# minor version (assuming that nothing needs to change), and push it.

minor=$(( LTS_MINOR - 1 ))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ FROM ubuntu:16.04

MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>

ARG GHC_VERSION=8.0.2
ARG LTS_SLUG=lts-8.0
ARG GHC_VERSION=8.2.2
ARG LTS_SLUG=lts-10.0
ARG PID1_VERSION=0.1.0.1
ARG STACK_VERSION=1.6.1
ARG BOOTSTRAP_COMMIT=a8234cb586c3022099a3b0155275ed067df00f72
ARG DEBIAN_FRONTEND=noninteractive

#
Expand All @@ -22,10 +24,15 @@ ENV LANG=C.UTF-8 \

RUN apt-get update && \
apt-get install -y wget && \
wget -qO- https://raw.githubusercontent.com/fpco/stackage/93738c5865fdd0627508617215d01b78d4e2bf74/debian-bootstrap.sh | bash && \
ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION && \
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | bash && \
rm -rf /var/lib/apt/lists/*

#
# Create symlink to help tools find GHC documentation
#

RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION

#
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
Expand All @@ -39,12 +46,19 @@ RUN stack --system-ghc --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin inst
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true

#
# Install proper 'pid1' init daemon
# Install 'pid1' init daemon
#

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 && \
chown root:root /usr/local/sbin && \
chown root:root /usr/local/sbin/pid1

#
# Install Stack
#

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'

#
# Set up pid1 entrypoint and default command
#
Expand Down
2 changes: 1 addition & 1 deletion etc/dockerfiles/stack-build/lts-9.20/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM fpco/stack-build:lts-9.0
ARG STACK_VERSION=1.6.1
RUN curl -sSL 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'
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'

0 comments on commit 57c974b

Please sign in to comment.