Skip to content

Commit

Permalink
fix docker images to work with cql-io-1.1.0 (#697)
Browse files Browse the repository at this point in the history
* Cleanup Dockerfiles.

* Dockerfile.prebuilder: pull in unreleased stack to fix a bug.

* Use system-ghc.
  • Loading branch information
fisx authored Apr 1, 2019
1 parent 3cd8cce commit 5c61f24
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
3 changes: 3 additions & 0 deletions build/alpine/Dockerfile.builder
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ WORKDIR /
#
# Finally, we build docs for haskell-src-exts without hyperlinking enabled
# to avoid a Haddock segfault. See https://github.com/haskell/haddock/issues/928
#
# Note: git, ncurses, sed are added here for historical reasons; since
# roughly 2019-03-28, they are included in prebuilder as well.

RUN apk add --no-cache git ncurses sed && \
git clone -b develop https://github.com/wireapp/wire-server.git && \
Expand Down
15 changes: 14 additions & 1 deletion build/alpine/Dockerfile.prebuilder
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,23 @@ RUN apk add --no-cache \
llvm-libunwind-dev \
bash \
xz \
libxml2-dev
libxml2-dev \
git \
ncurses \
sed

# get static version of Haskell Stack and use system ghc by default
ARG STACK_ALPINE_VERSION=1.9.1
RUN curl -sSfL https://github.com/commercialhaskell/stack/releases/download/v${STACK_ALPINE_VERSION}/stack-${STACK_ALPINE_VERSION}-linux-x86_64-static.tar.gz \
| tar --wildcards -C /usr/local/bin --strip-components=1 -xzvf - '*/stack' && chmod 755 /usr/local/bin/stack && \
stack config set system-ghc --global true

# upgrade stack to current master (2019-03-28). this fixes an issue
# with building internal libraries as used in cql-io-1.1.0.
# details: https://github.com/commercialhaskell/stack/pull/4596
RUN git clone https://github.com/commercialhaskell/stack && \
cd stack && \
git checkout f0b66a1ab60fb5be85f6cb60491915bf53d3cd3c && \
sed -i -e 's/lts-12.20/lts-12.14/' snapshot-lts-12.yaml && \
stack install --system-ghc --stack-yaml=stack-lts-12.yaml --system-ghc && \
cp /root/.local/bin/stack /usr/local/bin/stack

0 comments on commit 5c61f24

Please sign in to comment.