From 896e15115aa3a49b19837e07281110f0048e8913 Mon Sep 17 00:00:00 2001 From: Herbert Valerio Riedel Date: Mon, 5 Aug 2019 20:32:51 +0200 Subject: [PATCH] Revert "Dockerfile: build with the HEAD version of cabal-install" see PR #836 This reverts commit f4169620d4a90d1c8660781c765dee3a56f63660. --- Dockerfile | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9a8c8d8f2..40a6962f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,43 +10,35 @@ # Docker> # hackage-server run --static-dir=datafiles # -# Set up the system environment. FROM ubuntu + RUN apt-get update RUN apt-get install -y software-properties-common RUN apt-add-repository ppa:hvr/ghc RUN apt-get update +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y unzip libicu-dev postfix RUN DEBIAN_FRONTEND=noninteractive apt-get install -y ghc-8.2.2 cabal-install-2.4 ENV PATH /opt/ghc/bin:$PATH RUN cabal v2-update - -# Install current HEAD version of cabal-install. -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y curl zlib1g-dev -WORKDIR /tmp -RUN curl --silent -L https://github.com/haskell/cabal/tarball/dc138034d469973fee43af86764567e4202ca84b | tar xz -WORKDIR /tmp/haskell-cabal-dc13803 -RUN cabal v2-install -j cabal-install -ENV PATH /root/.cabal/bin:$PATH - -# Build hackage-server. -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y zlib1g-dev libssl-dev unzip libicu-dev postfix +RUN apt-get install -y zlib1g-dev libssl-dev RUN mkdir /build WORKDIR /build ADD hackage-server.cabal cabal.project ./ -RUN cabal v2-build --only-dependencies --enable-tests -RUN cabal v2-install --help -RUN cabal v2-install --installdir=/root/.cabal/bin hackage-repo-tool +RUN cabal v2-build --only-dependencies --enable-tests -j +RUN cabal v2-install hackage-repo-tool +ENV PATH /root/.cabal/bin:$PATH ADD . ./ RUN hackage-repo-tool create-keys --keys keys RUN cp keys/timestamp/*.private datafiles/TUF/timestamp.private RUN cp keys/snapshot/*.private datafiles/TUF/snapshot.private RUN hackage-repo-tool create-root --keys keys -o datafiles/TUF/root.json RUN hackage-repo-tool create-mirrors --keys keys -o datafiles/TUF/mirrors.json +RUN cabal v2-build # tests currently don't pass: the hackage-security work introduced some # backup/restore errors (though they look harmless) # see https://github.com/haskell/hackage-server/issues/425 #RUN cabal v2-test -RUN cabal v2-install --installdir=/root/.cabal/bin all +RUN cabal v2-install -j . # setup server runtime environment RUN mkdir /runtime