Commit 9103ff17 authored by Oleg Grenrus's avatar Oleg Grenrus Committed by Ben Gamari
Browse files

Update CI images to GHC-8.4.4 & cabal-install-2.4.1.0

Use official bindists, except for Debian 9/Stretch
http://downloads.haskell.org/debian/ is used. (There are no recent
GHC/cabal-install for Debian 8/Jessie there)

Use v2-update/v2-install to install Haskell tools.

Try to unify structure of the different Dockerfiles, including
installing GHC in one step (this will prevent sublayers from existing,
making final image slightly smaller)
parent 173e478c
......@@ -19,15 +19,15 @@ RUN apt-get install -qy python3-sphinx texlive-xetex texlive-latex-extra
RUN apt-get install -qy libgmp-dev:i386
# Get i386 GHC bindist for 32 bit CI builds.
RUN cd /tmp && curl https://downloads.haskell.org/~ghc/8.4.2/ghc-8.4.2-i386-deb8-linux.tar.xz | tar -Jx
RUN cd /tmp/ghc-8.4.2 && setarch i386 ./configure --prefix=/opt/ghc-i386/8.4.2 CFLAGS=-m32 --target=i386-unknown-linux --build=i386-unknown-linux --host=i386-unknown-linux
RUN cd /tmp/ghc-8.4.2 && make install
RUN rm -rf /tmp/ghc-8.4.2
ENV PATH /opt/ghc-i386/8.4.2/bin:$PATH
RUN cd /tmp && curl https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-i386-deb8-linux.tar.xz | tar -Jx; \
cd /tmp/ghc-8.4.4 && setarch i386 ./configure --prefix=/opt/ghc-i386/8.4.4 CFLAGS=-m32 --target=i386-unknown-linux --build=i386-unknown-linux --host=i386-unknown-linux; \
cd /tmp/ghc-8.4.4 && make install; \
rm -rf /tmp/ghc-8.4.4
ENV PATH /opt/ghc-i386/8.4.4/bin:$PATH
# Get Cabal
RUN cd /tmp && \
curl https://www.haskell.org/cabal/release/cabal-install-2.2.0.0/cabal-install-2.2.0.0-i386-unknown-linux.tar.gz | tar -zx && \
curl https://downloads.haskell.org/cabal/cabal-install-2.4.1.0/cabal-install-2.4.1.0-i386-unknown-linux.tar.xz | tar -Jx && \
mv cabal /usr/local/bin/cabal
# Create a normal user.
......@@ -37,8 +37,8 @@ USER ghc
WORKDIR /home/ghc/
# Build Haskell tools
RUN cabal update && \
cabal install hscolour happy alex
RUN cabal v2-update && \
cabal v2-install hscolour happy alex
ENV PATH /home/ghc/.cabal/bin:$PATH
CMD ["bash"]
......@@ -19,15 +19,15 @@ RUN apt-get install -qy python3-sphinx texlive-xetex texlive-latex-extra
RUN apt-get install -qy libgmp-dev:i386
# Get i386 GHC bindist for 32 bit CI builds.
RUN cd /tmp && curl https://downloads.haskell.org/~ghc/8.4.2/ghc-8.4.2-i386-deb8-linux.tar.xz | tar -Jx
RUN cd /tmp/ghc-8.4.2 && setarch i386 ./configure --prefix=/opt/ghc-i386/8.4.2 CFLAGS=-m32 --target=i386-unknown-linux --build=i386-unknown-linux --host=i386-unknown-linux
RUN cd /tmp/ghc-8.4.2 && make install
RUN rm -rf /tmp/ghc-8.4.2
ENV PATH /opt/ghc-i386/8.4.2/bin:$PATH
RUN cd /tmp && curl https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-i386-deb8-linux.tar.xz | tar -Jx; \
cd /tmp/ghc-8.4.4 && setarch i386 ./configure --prefix=/opt/ghc-i386/8.4.4 CFLAGS=-m32 --target=i386-unknown-linux --build=i386-unknown-linux --host=i386-unknown-linux; \
cd /tmp/ghc-8.4.4 && make install; \
rm -rf /tmp/ghc-8.4.4
ENV PATH /opt/ghc-i386/8.4.4/bin:$PATH
# Get Cabal
RUN cd /tmp && \
curl https://www.haskell.org/cabal/release/cabal-install-2.2.0.0/cabal-install-2.2.0.0-i386-unknown-linux.tar.gz | tar -zx && \
curl https://downloads.haskell.org/cabal/cabal-install-2.4.1.0/cabal-install-2.4.1.0-i386-unknown-linux.tar.xz | tar -Jx && \
mv cabal /usr/local/bin/cabal
# Create a normal user.
......@@ -37,8 +37,8 @@ USER ghc
WORKDIR /home/ghc/
# Build Haskell tools
RUN cabal update && \
cabal install hscolour happy alex
RUN cabal v2-update && \
cabal v2-install hscolour happy alex
ENV PATH /home/ghc/.cabal/bin:$PATH
CMD ["bash"]
......@@ -33,12 +33,16 @@ ENV PATH /usr/libexec/python3-sphinx:$PATH
RUN sed -i -e 's/systemd//g' /etc/nsswitch.conf
# Install GHC and cabal
RUN cd /tmp && curl https://downloads.haskell.org/~ghc/8.4.2/ghc-8.4.2-x86_64-deb8-linux.tar.xz | tar -Jx
RUN cd /tmp/ghc-8.4.2 && ./configure --prefix=/opt/ghc/8.4.2
RUN cd /tmp/ghc-8.4.2 && make install
RUN mkdir -p /opt/cabal/bin
RUN cd /opt/cabal/bin && curl https://www.haskell.org/cabal/release/cabal-install-2.2.0.0/cabal-install-2.2.0.0-x86_64-unknown-linux.tar.gz | tar -zx
ENV PATH /opt/ghc/8.4.2/bin:/opt/cabal/bin:$PATH
RUN cd /tmp && curl https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-x86_64-centos70-linux.tar.xz | tar -Jx; \
cd /tmp/ghc-8.4.4 && ./configure --prefix=/opt/ghc/8.4.4; \
cd /tmp/ghc-8.4.4 && make install; \
rm -rf /tmp/ghc-8.4.4
ENV PATH /opt/ghc/8.4.4/bin:$PATH
# Get Cabal
RUN cd /tmp && \
curl https://downloads.haskell.org/cabal/cabal-install-2.4.1.0/cabal-install-2.4.1.0-x86_64-unknown-linux.tar.xz | tar -Jx && \
mv cabal /usr/local/bin/cabal
# Create a normal user.
RUN adduser ghc --comment "GHC builds"
......@@ -46,9 +50,9 @@ RUN echo "ghc ALL = NOPASSWD : ALL" > /etc/sudoers.d/ghc
USER ghc
WORKDIR /home/ghc/
# Install Alex, Happy, and HsColor with Cabal
RUN cabal update && \
cabal install hscolour happy alex
# Build Haskell tools
RUN cabal v2-update && \
cabal v2-install hscolour happy alex
ENV PATH /home/ghc/.cabal/bin:$PATH
CMD ["bash"]
......@@ -2,23 +2,27 @@ FROM debian:jessie
ENV LANG C.UTF-8
RUN echo 'deb http://ppa.launchpad.net/hvr/ghc/ubuntu trusty main' > /etc/apt/sources.list.d/ghc.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F6F88286
RUN apt-get update -qq
# Core build utilities
RUN apt-get update -qq
RUN apt-get install -qy zlib1g-dev libtinfo-dev libsqlite3-0 libsqlite3-dev \
ca-certificates g++ git make automake autoconf gcc \
perl python3 texinfo xz-utils lbzip2 patch openssh-client sudo \
perl python3 texinfo xz-utils lbzip2 patch openssh-client sudo libgmp-dev \
jq wget curl
# Documentation tools
RUN apt-get install -qy python3-sphinx texlive-xetex texlive-latex-extra
# Basic Haskell toolchain
RUN apt-get install -qy cabal-install-2.2 ghc-8.4.2
# Install GHC and cabal
RUN cd /tmp && curl https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-x86_64-deb8-linux.tar.xz | tar -Jx; \
cd /tmp/ghc-8.4.4 && ./configure --prefix=/opt/ghc/8.4.4; \
cd /tmp/ghc-8.4.4 && make install; \
rm -rf /tmp/ghc-8.4.4
ENV PATH /opt/ghc/8.4.4/bin:$PATH
ENV PATH /home/ghc/.local/bin:/opt/cabal/2.2/bin:/opt/ghc/8.4.2/bin:$PATH
# Get Cabal
RUN cd /tmp && \
curl https://downloads.haskell.org/cabal/cabal-install-2.4.1.0/cabal-install-2.4.1.0-x86_64-unknown-linux.tar.xz | tar -Jx && \
mv cabal /usr/local/bin/cabal
# Create a normal user.
RUN adduser ghc --gecos "GHC builds" --disabled-password
......@@ -27,8 +31,8 @@ USER ghc
WORKDIR /home/ghc/
# Build Haskell tools
RUN cabal update && \
cabal install hscolour happy alex
RUN cabal v2-update && \
cabal v2-install hscolour happy alex
ENV PATH /home/ghc/.cabal/bin:$PATH
CMD ["bash"]
......@@ -4,8 +4,9 @@ ENV LANG C.UTF-8
RUN apt-get update -qq; apt-get install -qy gnupg
RUN echo 'deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main' > /etc/apt/sources.list.d/ghc.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F6F88286
# http://downloads.haskell.org/debian/
RUN echo 'deb http://downloads.haskell.org/debian stretch main' > /etc/apt/sources.list.d/ghc.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574
RUN apt-get update -qq
# Core build utilities
......@@ -18,9 +19,9 @@ RUN apt-get install -qy zlib1g-dev libtinfo-dev libsqlite3-0 libsqlite3-dev \
RUN apt-get install -qy python3-sphinx texlive-xetex texlive-latex-extra
# Basic Haskell toolchain
RUN apt-get install -qy cabal-install-2.2 ghc-8.4.2
RUN apt-get install -qy cabal-install-2.4 ghc-8.4.4
ENV PATH /home/ghc/.local/bin:/opt/cabal/2.2/bin:/opt/ghc/8.4.2/bin:$PATH
ENV PATH /home/ghc/.local/bin:/opt/cabal/2.4/bin:/opt/ghc/8.4.4/bin:$PATH
# LLVM
ENV LLVM_TARBALL http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
......@@ -38,8 +39,8 @@ USER ghc
WORKDIR /home/ghc/
# Build Haskell tools
RUN cabal update && \
cabal install hscolour happy alex
RUN cabal v2-update && \
cabal v2-install hscolour happy alex
ENV PATH /home/ghc/.cabal/bin:$PATH
CMD ["bash"]
......@@ -29,12 +29,16 @@ ENV PATH /usr/libexec/python3-sphinx:$PATH
RUN sed -i -e 's/systemd//g' /etc/nsswitch.conf
# Install GHC and cabal
RUN cd /tmp && curl https://downloads.haskell.org/~ghc/8.4.2/ghc-8.4.2-x86_64-deb8-linux.tar.xz | tar -Jx
RUN cd /tmp/ghc-8.4.2 && ./configure --prefix=/opt/ghc/8.4.2
RUN cd /tmp/ghc-8.4.2 && make install
RUN mkdir -p /opt/cabal/bin
RUN cd /opt/cabal/bin && curl https://www.haskell.org/cabal/release/cabal-install-2.2.0.0/cabal-install-2.2.0.0-x86_64-unknown-linux.tar.gz | tar -zx
ENV PATH /opt/ghc/8.4.2/bin:/opt/cabal/bin:$PATH
RUN cd /tmp && curl https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-x86_64-fedora27-linux.tar.xz | tar -Jx; \
cd /tmp/ghc-8.4.4 && ./configure --prefix=/opt/ghc/8.4.4; \
cd /tmp/ghc-8.4.4 && make install; \
rm -rf /tmp/ghc-8.4.4
ENV PATH /opt/ghc/8.4.4/bin:$PATH
# Get Cabal
RUN cd /tmp && \
curl https://downloads.haskell.org/cabal/cabal-install-2.4.1.0/cabal-install-2.4.1.0-x86_64-unknown-linux.tar.xz | tar -Jx && \
mv cabal /usr/local/bin/cabal
# Create a normal user.
RUN adduser ghc --comment "GHC builds"
......@@ -42,9 +46,9 @@ RUN echo "ghc ALL = NOPASSWD : ALL" > /etc/sudoers.d/ghc
USER ghc
WORKDIR /home/ghc/
# Install Alex, Happy, and HsColor with Cabal
RUN cabal update && \
cabal install hscolour happy alex
# Build Haskell tools
RUN cabal v2-update && \
cabal v2-install hscolour happy alex
ENV PATH /home/ghc/.cabal/bin:$PATH
CMD ["bash"]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment