diff --git a/README.md b/README.md index 57cd48fef70b96990aa91a1c0f5ff3711e48cee8..86b654fb45923a40ec94812f04db04de82b4cfb2 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ include the Haskell Tool Stack (Stack). There is currently no GHC binary distribution for Alpine Linux (AArch64) available! -:exclamation: One must use the `--system-ghc --no-install-ghc` flags when using +:exclamation: One must use the `--no-install-ghc --system-ghc` flags when using `stack` with the image for the `arm64/v8` architecture. ## Similar projects diff --git a/bootstrap/amd64.Dockerfile b/bootstrap/amd64.Dockerfile index d0eae83810d20f14713484c9660fd88cad69d657..4b28a054d47329ccf4590ed3a34d41b2f03ee637 100644 --- a/bootstrap/amd64.Dockerfile +++ b/bootstrap/amd64.Dockerfile @@ -8,7 +8,7 @@ ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.2.0.0} COPY ghc-8.8.patch /tmp/ COPY cabal-0001-force-ld.gold.patch /tmp/ -RUN apk add --update --no-cache \ +RUN apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -43,7 +43,7 @@ LABEL org.label-schema.license="MIT" \ ENV GHC_VERSION=${GHC_VERSION_BUILD:-8.8.3} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.2.0.0} -RUN apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ diff --git a/bootstrap/arm64.Dockerfile b/bootstrap/arm64.Dockerfile index d5925ef4876a6c699007a0aedc3376009b871b6e..aa0c3115e042998ea4cada20fa87e2448042ffa7 100644 --- a/bootstrap/arm64.Dockerfile +++ b/bootstrap/arm64.Dockerfile @@ -8,7 +8,7 @@ ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.2.0.0} COPY ghc-8.8.patch /tmp/ COPY cabal-0001-force-ld.gold.patch /tmp/ -RUN apk add --update --no-cache \ +RUN apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -26,8 +26,8 @@ RUN apk add --update --no-cache \ zlib-dev RUN cd /tmp/ \ - && wget https://gitlab.b-data.ch/ghc/ghc-bootstrap-aarch64/-/raw/main/ghc-8.8.3-r0.apk \ - && apk add --allow-untrusted ghc-8.8.3-r0.apk \ + && curl -sSLO https://gitlab.b-data.ch/ghc/ghc-bootstrap-aarch64/-/raw/main/ghc-8.8.3-r0.apk \ + && apk add --allow-untrusted --no-cache ghc-8.8.3-r0.apk \ && curl -sSLO https://downloads.haskell.org/~cabal/cabal-install-$CABAL_VERSION/cabal-install-$CABAL_VERSION.tar.gz \ && tar zxf cabal-install-$CABAL_VERSION.tar.gz \ && cd /tmp/cabal-install-$CABAL_VERSION/ \ @@ -44,7 +44,7 @@ LABEL org.label-schema.license="MIT" \ ENV GHC_VERSION=${GHC_VERSION_BUILD:-8.8.3} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.2.0.0} -RUN apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -74,9 +74,8 @@ RUN apk add --update --no-cache \ zlib-dev \ #zlib-static \ && cd /tmp/ \ - && wget https://gitlab.b-data.ch/ghc/ghc-bootstrap-aarch64/-/raw/main/ghc-8.8.3-r0.apk \ - && apk add --allow-untrusted ghc-8.8.3-r0.apk \ - && cd / \ + && curl -sSLO https://gitlab.b-data.ch/ghc/ghc-bootstrap-aarch64/-/raw/main/ghc-8.8.3-r0.apk \ + && apk add --allow-untrusted --no-cache ghc-8.8.3-r0.apk \ && rm -rf /tmp/* COPY --from=bootstrap /root/.cabal/bin/cabal /usr/bin/cabal diff --git a/latest.Dockerfile b/latest.Dockerfile index 9ae84b7f181e27481c6f38f06eca289f363f5367..8f916b796706f79d47b5e8b1d4cbbc5e8a8e6efe 100644 --- a/latest.Dockerfile +++ b/latest.Dockerfile @@ -11,7 +11,7 @@ ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -66,8 +66,7 @@ ARG CABAL_VERSION_BUILD ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} -RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -107,7 +106,6 @@ RUN cd /tmp \ && cd ghc-"$GHC_VERSION"-*-alpine-linux \ && ./configure --disable-ld-override \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester diff --git a/prior/8.10.1.Dockerfile b/prior/8.10.1.Dockerfile index 9ce86e1301abd51f6168830790f215c7f8df3947..1ab4dc7eefa5c816e37f64f3a0cccd23263b6a54 100644 --- a/prior/8.10.1.Dockerfile +++ b/prior/8.10.1.Dockerfile @@ -6,7 +6,8 @@ FROM registry.gitlab.b-data.ch/ghc/ghc4pandoc:8.8.4 as bootstrap ENV GHC_VERSION=${GHC_VERSION_BUILD:-8.10.1} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.2.0.0} -RUN apk add --update --no-cache \ +RUN apk upgrade --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -50,11 +51,11 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnueabi/alpine-linux/g' llvm-targets \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && make -j$((`nproc`+1)) \ + && make -j"$(($(nproc)+1))" \ && make binary-dist \ && cabal update \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history - && cabal install cabal-install-$CABAL_VERSION + && cabal install --constraint 'Cabal-syntax<3.3' cabal-install-$CABAL_VERSION FROM alpine:3.13 as builder @@ -65,7 +66,7 @@ LABEL org.label-schema.license="MIT" \ ENV GHC_VERSION=${GHC_VERSION_BUILD:-8.10.1} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.2.0.0} -RUN apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -105,11 +106,12 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION \ && ./configure --disable-ld-override --prefix=/usr \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/8.10.4.Dockerfile b/prior/8.10.4.Dockerfile index 2d38a336d362d0e110b240631188a5c585dfc07b..40b74a348061c87990ed977bb62df4d640e7b638 100644 --- a/prior/8.10.4.Dockerfile +++ b/prior/8.10.4.Dockerfile @@ -6,7 +6,8 @@ FROM registry.gitlab.b-data.ch/ghc/ghc4pandoc:8.8.4 as bootstrap ENV GHC_VERSION=${GHC_VERSION_BUILD:-8.10.4} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.2.0.0} -RUN apk add --update --no-cache \ +RUN apk upgrade --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -50,11 +51,11 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnueabi/alpine-linux/g' llvm-targets \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && make -j$((`nproc`+1)) \ + && make -j"$(($(nproc)+1))" \ && make binary-dist \ && cabal update \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history - && cabal install cabal-install-$CABAL_VERSION + && cabal install --constraint 'Cabal-syntax<3.3' cabal-install-$CABAL_VERSION FROM alpine:3.13 as builder @@ -65,7 +66,7 @@ LABEL org.label-schema.license="MIT" \ ENV GHC_VERSION=${GHC_VERSION_BUILD:-8.10.4} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.2.0.0} -RUN apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -105,11 +106,12 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION \ && ./configure --disable-ld-override --prefix=/usr \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/8.10.5.Dockerfile b/prior/8.10.5.Dockerfile index a7ff026120998cf05b4d3790ec617678c5f78725..4fee5179409ef586817d277429cd72d312362b87 100644 --- a/prior/8.10.5.Dockerfile +++ b/prior/8.10.5.Dockerfile @@ -6,7 +6,8 @@ FROM registry.gitlab.b-data.ch/ghc/ghc4pandoc:8.8.4 as bootstrap ENV GHC_VERSION=${GHC_VERSION_BUILD:-8.10.5} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.2.0.0} -RUN apk add --update --no-cache \ +RUN apk upgrade --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -26,8 +27,8 @@ RUN apk add --update --no-cache \ RUN cd /tmp \ && curl -sSLO https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-src.tar.xz \ && curl -sSLO https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-src.tar.xz.sig \ - && gpg --keyserver hkps://pgp.mit.edu:443 \ - --receive-keys 588764FBE22D19C4 \ + && gpg --keyserver hkps://keyserver.ubuntu.com:443 \ + --receive-keys 88B57FCF7DB53B4DB3BFA4B1588764FBE22D19C4 \ && gpg --verify ghc-$GHC_VERSION-src.tar.xz.sig ghc-$GHC_VERSION-src.tar.xz \ && tar xf ghc-$GHC_VERSION-src.tar.xz \ && cd ghc-$GHC_VERSION \ @@ -50,11 +51,11 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnueabi/alpine-linux/g' llvm-targets \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && make -j$((`nproc`+1)) \ + && make -j"$(($(nproc)+1))" \ && make binary-dist \ && cabal update \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history - && cabal install cabal-install-$CABAL_VERSION + && cabal install --constraint 'Cabal-syntax<3.3' cabal-install-$CABAL_VERSION FROM alpine:3.13 as builder @@ -65,7 +66,7 @@ LABEL org.label-schema.license="MIT" \ ENV GHC_VERSION=${GHC_VERSION_BUILD:-8.10.5} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.2.0.0} -RUN apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -105,11 +106,12 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION \ && ./configure --disable-ld-override --prefix=/usr \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/8.10.6.Dockerfile b/prior/8.10.6.Dockerfile index bc59f059c142f1f91f97be05bf25617b7f6490db..7bc719259ec1dcfc50e40a16b21a8cc810a083b4 100644 --- a/prior/8.10.6.Dockerfile +++ b/prior/8.10.6.Dockerfile @@ -6,7 +6,8 @@ FROM registry.gitlab.b-data.ch/ghc/ghc4pandoc:8.8.4 as bootstrap ENV GHC_VERSION=${GHC_VERSION_BUILD:-8.10.6} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.2.0.0} -RUN apk add --update --no-cache \ +RUN apk upgrade --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -26,8 +27,8 @@ RUN apk add --update --no-cache \ RUN cd /tmp \ && curl -sSLO https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-src.tar.xz \ && curl -sSLO https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-src.tar.xz.sig \ - && gpg --keyserver hkps://pgp.mit.edu:443 \ - --receive-keys 588764FBE22D19C4 \ + && gpg --keyserver hkps://keyserver.ubuntu.com:443 \ + --receive-keys 88B57FCF7DB53B4DB3BFA4B1588764FBE22D19C4 \ && gpg --verify ghc-$GHC_VERSION-src.tar.xz.sig ghc-$GHC_VERSION-src.tar.xz \ && tar xf ghc-$GHC_VERSION-src.tar.xz \ && cd ghc-$GHC_VERSION \ @@ -50,11 +51,11 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnueabi/alpine-linux/g' llvm-targets \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && make -j$((`nproc`+1)) \ + && make -j"$(($(nproc)+1))" \ && make binary-dist \ && cabal update \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history - && cabal install cabal-install-$CABAL_VERSION + && cabal install --constraint 'Cabal-syntax<3.3' cabal-install-$CABAL_VERSION FROM alpine:3.13 as builder @@ -65,7 +66,7 @@ LABEL org.label-schema.license="MIT" \ ENV GHC_VERSION=${GHC_VERSION_BUILD:-8.10.6} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.2.0.0} -RUN apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -105,11 +106,12 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION \ && ./configure --disable-ld-override --prefix=/usr \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/8.10.7.Dockerfile b/prior/8.10.7.Dockerfile index 147d990d90ba9cf146b89465b0a028ad8eab7434..38dcc9717ea3a9e54cec103fc7d05e7898f7def0 100644 --- a/prior/8.10.7.Dockerfile +++ b/prior/8.10.7.Dockerfile @@ -6,7 +6,8 @@ FROM registry.gitlab.b-data.ch/ghc/ghc4pandoc:8.8.4 as bootstrap ENV GHC_VERSION=${GHC_VERSION_BUILD:-8.10.7} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.2.0.0} -RUN apk add --update --no-cache \ +RUN apk upgrade --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -26,8 +27,8 @@ RUN apk add --update --no-cache \ RUN cd /tmp \ && curl -sSLO https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-src.tar.xz \ && curl -sSLO https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-src.tar.xz.sig \ - && gpg --keyserver hkps://pgp.mit.edu:443 \ - --receive-keys 588764FBE22D19C4 \ + && gpg --keyserver hkps://keyserver.ubuntu.com:443 \ + --receive-keys 88B57FCF7DB53B4DB3BFA4B1588764FBE22D19C4 \ && gpg --verify ghc-$GHC_VERSION-src.tar.xz.sig ghc-$GHC_VERSION-src.tar.xz \ && tar xf ghc-$GHC_VERSION-src.tar.xz \ && cd ghc-$GHC_VERSION \ @@ -50,11 +51,11 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnueabi/alpine-linux/g' llvm-targets \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && make -j$((`nproc`+1)) \ + && make -j"$(($(nproc)+1))" \ && make binary-dist \ && cabal update \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history - && cabal install cabal-install-$CABAL_VERSION + && cabal install --constraint 'Cabal-syntax<3.3' cabal-install-$CABAL_VERSION FROM alpine:3.13 as builder @@ -65,7 +66,7 @@ LABEL org.label-schema.license="MIT" \ ENV GHC_VERSION=${GHC_VERSION_BUILD:-8.10.7} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.2.0.0} -RUN apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -105,11 +106,12 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION \ && ./configure --disable-ld-override --prefix=/usr \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/8.8.4.Dockerfile b/prior/8.8.4.Dockerfile index 53f00cacfd859ebd4418928a4ec611c11c9b3ebf..e5ff6122d727cab9e563f5fbb506139d6a96789f 100644 --- a/prior/8.8.4.Dockerfile +++ b/prior/8.8.4.Dockerfile @@ -6,7 +6,8 @@ FROM registry.gitlab.b-data.ch/ghc/ghc4pandoc:bootstrap as bootstrap ENV GHC_VERSION=${GHC_VERSION_BUILD:-8.8.4} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.2.0.0} -RUN apk add --update --no-cache \ +RUN apk upgrade --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -50,11 +51,11 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnueabi/alpine-linux/g' llvm-targets \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && make -j$((`nproc`+1)) \ + && make -j"$(($(nproc)+1))" \ && make binary-dist \ && cabal update \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history - && cabal install cabal-install-$CABAL_VERSION + && cabal install --constraint 'Cabal-syntax<3.3' cabal-install-$CABAL_VERSION FROM alpine:3.12 as builder @@ -65,7 +66,7 @@ LABEL org.label-schema.license="MIT" \ ENV GHC_VERSION=${GHC_VERSION_BUILD:-8.8.4} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.2.0.0} -RUN apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -105,11 +106,12 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION \ && ./configure --disable-ld-override --prefix=/usr \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/9.0.1.Dockerfile b/prior/9.0.1.Dockerfile index c538f79d06f3c8e86b1bc86e2784faa90fc126fc..d841b558c210f1a7d09f27356cba91d39a00aa94 100644 --- a/prior/9.0.1.Dockerfile +++ b/prior/9.0.1.Dockerfile @@ -6,7 +6,8 @@ FROM registry.gitlab.b-data.ch/ghc/ghc4pandoc:8.10.7 as bootstrap ENV GHC_VERSION=${GHC_VERSION_BUILD:-9.0.1} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.4.0.0} -RUN apk add --update --no-cache \ +RUN apk upgrade --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -50,11 +51,11 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnueabi/alpine-linux/g' llvm-targets \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && make -j$((`nproc`+1)) \ + && make -j"$(($(nproc)+1))" \ && make binary-dist \ && cabal update \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history - && cabal install cabal-install-$CABAL_VERSION + && cabal install --constraint 'Cabal-syntax<3.5' cabal-install-$CABAL_VERSION FROM alpine:3.15 as builder @@ -66,7 +67,7 @@ ENV GHC_VERSION=${GHC_VERSION_BUILD:-9.0.1} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.4.0.0} ENV PATH=$PATH:/usr/lib/llvm10/bin -RUN apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -106,11 +107,12 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION \ && ./configure --disable-ld-override --prefix=/usr \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/9.0.2.Dockerfile b/prior/9.0.2.Dockerfile index c44b679536cc533e8b3ba74c1bc37f66f31f9935..4741225c44734219c6493ae0ed7bdd1a6f5cf8c4 100644 --- a/prior/9.0.2.Dockerfile +++ b/prior/9.0.2.Dockerfile @@ -6,7 +6,8 @@ FROM registry.gitlab.b-data.ch/ghc/ghc4pandoc:8.10.7 as bootstrap ENV GHC_VERSION=${GHC_VERSION_BUILD:-9.0.2} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.4.0.0} -RUN apk add --update --no-cache \ +RUN apk upgrade --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -50,11 +51,11 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnueabi/alpine-linux/g' llvm-targets \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && make -j$((`nproc`+1)) \ + && make -j"$(($(nproc)+1))" \ && make binary-dist \ && cabal update \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history - && cabal install cabal-install-$CABAL_VERSION + && cabal install --constraint 'Cabal-syntax<3.5' cabal-install-$CABAL_VERSION FROM alpine:3.15 as builder @@ -66,7 +67,7 @@ ENV GHC_VERSION=${GHC_VERSION_BUILD:-9.0.2} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.4.0.0} ENV PATH=$PATH:/usr/lib/llvm10/bin -RUN apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -106,11 +107,12 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION \ && ./configure --disable-ld-override --prefix=/usr \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/9.2.1.Dockerfile b/prior/9.2.1.Dockerfile index 4b70767de457d295a543247d296f16d877b91a6c..b20536c0bb6b62f3888cb0c3a3d706c1446def81 100644 --- a/prior/9.2.1.Dockerfile +++ b/prior/9.2.1.Dockerfile @@ -9,7 +9,7 @@ ENV GHC_VERSION=${GHC_VERSION_BUILD:-9.2.1} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.6.0.0} RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -56,7 +56,7 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnueabi/alpine-linux/g' llvm-targets \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && make -j$((`nproc`+1)) \ + && make -j"$(($(nproc)+1))" \ && make binary-dist \ && cabal update \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history @@ -71,8 +71,7 @@ LABEL org.label-schema.license="MIT" \ ENV GHC_VERSION=${GHC_VERSION_BUILD:-9.2.1} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.6.0.0} -RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -112,11 +111,12 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION \ && ./configure --disable-ld-override --prefix=/usr \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/9.2.2.Dockerfile b/prior/9.2.2.Dockerfile index ffb124aba61ee084372a2232895a238ac0b91b1c..9a1ee58a50eb7003364a6b2d874c04edc6f4418d 100644 --- a/prior/9.2.2.Dockerfile +++ b/prior/9.2.2.Dockerfile @@ -7,7 +7,7 @@ ENV GHC_VERSION=${GHC_VERSION_BUILD:-9.2.2} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.6.2.0} RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -51,7 +51,7 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnueabi/alpine-linux/g' llvm-targets \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && make -j$((`nproc`+1)) \ + && make -j"$(($(nproc)+1))" \ && make binary-dist \ && cabal update \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history @@ -66,8 +66,7 @@ LABEL org.label-schema.license="MIT" \ ENV GHC_VERSION=${GHC_VERSION_BUILD:-9.2.2} ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.6.2.0} -RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -107,11 +106,12 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION \ && ./configure --disable-ld-override --prefix=/usr \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/9.2.3.Dockerfile b/prior/9.2.3.Dockerfile index e035c03b2c81963c81fd115a5248ea42ba755b11..8c38434c657f850104fed6e199cc53665a9598af 100644 --- a/prior/9.2.3.Dockerfile +++ b/prior/9.2.3.Dockerfile @@ -10,7 +10,7 @@ ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -54,7 +54,7 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnueabi/alpine-linux/g' llvm-targets \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && make -j$((`nproc`+1)) \ + && make -j"$(($(nproc)+1))" \ && make binary-dist \ && cabal update \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history @@ -72,8 +72,7 @@ ARG CABAL_VERSION_BUILD ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} -RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -113,11 +112,12 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION \ && ./configure --disable-ld-override --prefix=/usr \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/9.2.4.Dockerfile b/prior/9.2.4.Dockerfile index 7be00d84de4eb09edad854586c5c2a8262d0c2b8..216d7a5ca4934dc9b00c2a13ee7b3dbf992f191e 100644 --- a/prior/9.2.4.Dockerfile +++ b/prior/9.2.4.Dockerfile @@ -10,7 +10,7 @@ ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -54,7 +54,7 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnueabi/alpine-linux/g' llvm-targets \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && make -j$((`nproc`+1)) \ + && make -j"$(($(nproc)+1))" \ && make binary-dist \ && cabal update \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history @@ -72,8 +72,7 @@ ARG CABAL_VERSION_BUILD ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} -RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -113,11 +112,12 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION \ && ./configure --disable-ld-override --prefix=/usr \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/9.2.5.Dockerfile b/prior/9.2.5.Dockerfile index 712abbd13bec092a26dbe47d922cccb6a37cc6a6..c64c2ccb902e3b1e55ed8336b2fb970443ceedaf 100644 --- a/prior/9.2.5.Dockerfile +++ b/prior/9.2.5.Dockerfile @@ -10,7 +10,7 @@ ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -54,7 +54,7 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnueabi/alpine-linux/g' llvm-targets \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && make -j$((`nproc`+1)) \ + && make -j"$(($(nproc)+1))" \ && make binary-dist \ && cabal update \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history @@ -72,8 +72,7 @@ ARG CABAL_VERSION_BUILD ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} -RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -113,11 +112,12 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION \ && ./configure --disable-ld-override --prefix=/usr \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/9.2.6.Dockerfile b/prior/9.2.6.Dockerfile index e0046d3cfad55189f87262c9cced658c73277f0b..30c939dcd0f87c67c3e297ffb8c1a60ff491dc1c 100644 --- a/prior/9.2.6.Dockerfile +++ b/prior/9.2.6.Dockerfile @@ -10,7 +10,7 @@ ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -54,7 +54,7 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnueabi/alpine-linux/g' llvm-targets \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && make -j$((`nproc`+1)) \ + && make -j"$(($(nproc)+1))" \ && make binary-dist \ && cabal update \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history @@ -72,8 +72,7 @@ ARG CABAL_VERSION_BUILD ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} -RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -113,11 +112,12 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION \ && ./configure --disable-ld-override --prefix=/usr \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/9.2.7.Dockerfile b/prior/9.2.7.Dockerfile index d558c0df54d0d7365593c9af0f0d863ea995f330..19e5d8016d60d7b8ee3ddc95e9a2546f2247306b 100644 --- a/prior/9.2.7.Dockerfile +++ b/prior/9.2.7.Dockerfile @@ -10,7 +10,7 @@ ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -54,7 +54,7 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnueabi/alpine-linux/g' llvm-targets \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && make -j$((`nproc`+1)) \ + && make -j"$(($(nproc)+1))" \ && make binary-dist \ && cabal update \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history @@ -73,8 +73,7 @@ ARG CABAL_VERSION_BUILD ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} -RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -114,11 +113,12 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION \ && ./configure --disable-ld-override --prefix=/usr \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/9.2.8.Dockerfile b/prior/9.2.8.Dockerfile index fdbf8ca8b8772c51ca427e87eb83e1354b439213..b0b4af9031bec332a40a091afeaed9fce007e48d 100644 --- a/prior/9.2.8.Dockerfile +++ b/prior/9.2.8.Dockerfile @@ -11,7 +11,7 @@ ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -73,8 +73,7 @@ ARG CABAL_VERSION_BUILD ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} -RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -114,7 +113,6 @@ RUN cd /tmp \ && cd "ghc-$GHC_VERSION" \ && ./configure --disable-ld-override --prefix=/usr \ && make install \ - && cd / \ && rm -rf /tmp/* \ "/usr/share/doc/ghc-$GHC_VERSION"/* diff --git a/prior/9.4.1.Dockerfile b/prior/9.4.1.Dockerfile index fd13368d72412312f4adaaa4efa620ed3ee1e297..23369c0cb68418bb6083ca46dbea40b55227674c 100644 --- a/prior/9.4.1.Dockerfile +++ b/prior/9.4.1.Dockerfile @@ -10,7 +10,7 @@ ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -46,7 +46,7 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ && cabal update \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && hadrian/build binary-dist -j$((`nproc`+1)) \ + && hadrian/build binary-dist -j"$(($(nproc)+1))" \ --flavour=perf+llvm+split_sections \ --docs=none \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history @@ -64,8 +64,7 @@ ARG CABAL_VERSION_BUILD ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} -RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -105,7 +104,6 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION-*-alpine-linux \ && ./configure --disable-ld-override \ && make install \ - && cd / \ && rm -rf /tmp/* \ ## Somehow /tmp/ghc-$GHC_VERSION-*-alpine-linux ## ends up at /usr/local/share/doc/ghc-$GHC_VERSION @@ -113,6 +111,8 @@ RUN cd /tmp \ FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/9.4.2.Dockerfile b/prior/9.4.2.Dockerfile index f45b6c6ed91bb4e2c34ef2230ae93e5fe8e17b37..bd063a3e58c02d7433439eb8dca5b01f66d0cee5 100644 --- a/prior/9.4.2.Dockerfile +++ b/prior/9.4.2.Dockerfile @@ -10,7 +10,7 @@ ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -46,7 +46,7 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ && cabal update \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && hadrian/build binary-dist -j$((`nproc`+1)) \ + && hadrian/build binary-dist -j"$(($(nproc)+1))" \ --flavour=perf+llvm+split_sections \ --docs=none \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history @@ -65,8 +65,7 @@ ARG CABAL_VERSION_BUILD ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} -RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -106,7 +105,6 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION-*-alpine-linux \ && ./configure --disable-ld-override \ && make install \ - && cd / \ && rm -rf /tmp/* \ ## Somehow /tmp/ghc-$GHC_VERSION-*-alpine-linux ## ends up at /usr/local/share/doc/ghc-$GHC_VERSION @@ -114,6 +112,8 @@ RUN cd /tmp \ FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/9.4.3.Dockerfile b/prior/9.4.3.Dockerfile index 96399aefbe5fbffe4fdd614097706469502385ee..bcddb22742963b591ba2285a63a3cecfd5e30cc2 100644 --- a/prior/9.4.3.Dockerfile +++ b/prior/9.4.3.Dockerfile @@ -10,7 +10,7 @@ ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -46,7 +46,7 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ && cabal update \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && hadrian/build binary-dist -j$((`nproc`+1)) \ + && hadrian/build binary-dist -j"$(($(nproc)+1))" \ --flavour=perf+llvm+split_sections \ --docs=none \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history @@ -65,8 +65,7 @@ ARG CABAL_VERSION_BUILD ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} -RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -106,11 +105,12 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION-*-alpine-linux \ && ./configure --disable-ld-override \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/9.4.4.Dockerfile b/prior/9.4.4.Dockerfile index 396987165509a73dc28e52f0b29bffe8cb21c89f..680e20a0d86ecd6a4994e05d931964fc9a6ff90d 100644 --- a/prior/9.4.4.Dockerfile +++ b/prior/9.4.4.Dockerfile @@ -10,7 +10,7 @@ ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -46,7 +46,7 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ && cabal update \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && hadrian/build binary-dist -j$((`nproc`+1)) \ + && hadrian/build binary-dist -j"$(($(nproc)+1))" \ --flavour=perf+llvm+split_sections \ --docs=none \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history @@ -65,8 +65,7 @@ ARG CABAL_VERSION_BUILD ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} -RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -106,11 +105,12 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION-*-alpine-linux \ && ./configure --disable-ld-override \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/9.4.5.Dockerfile b/prior/9.4.5.Dockerfile index d9bcaeec0148b8e06f986585e7722ce8f5c6125e..e28c76bea1e5667e4955e019c4bce79e9e193e5c 100644 --- a/prior/9.4.5.Dockerfile +++ b/prior/9.4.5.Dockerfile @@ -10,7 +10,7 @@ ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -46,7 +46,7 @@ RUN cd /tmp \ && sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \ && cabal update \ # See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command - && hadrian/build binary-dist -j$((`nproc`+1)) \ + && hadrian/build binary-dist -j"$(($(nproc)+1))" \ --flavour=perf+llvm+split_sections \ --docs=none \ # See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history @@ -65,8 +65,7 @@ ARG CABAL_VERSION_BUILD ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} -RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -106,11 +105,12 @@ RUN cd /tmp \ && cd ghc-$GHC_VERSION-*-alpine-linux \ && ./configure --disable-ld-override \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \ diff --git a/prior/9.4.6.Dockerfile b/prior/9.4.6.Dockerfile index db5bcd7f04a501037a35885c5429eaee606b149b..8e6b898ffdc623fb1444ad65eb5631332ed04241 100644 --- a/prior/9.4.6.Dockerfile +++ b/prior/9.4.6.Dockerfile @@ -11,7 +11,7 @@ ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -66,8 +66,7 @@ ARG CABAL_VERSION_BUILD ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} -RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -107,7 +106,6 @@ RUN cd /tmp \ && cd ghc-"$GHC_VERSION"-*-alpine-linux \ && ./configure --disable-ld-override \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester diff --git a/prior/9.6.1.Dockerfile b/prior/9.6.1.Dockerfile index 45f17ed4b26184b12c81c443841f9940ed3174ab..d2ded6afeb6c85a5fbb0079e090ece9741e371c4 100644 --- a/prior/9.6.1.Dockerfile +++ b/prior/9.6.1.Dockerfile @@ -10,7 +10,7 @@ ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ + && apk add --no-cache \ autoconf \ automake \ binutils-gold \ @@ -65,8 +65,7 @@ ARG CABAL_VERSION_BUILD ENV GHC_VERSION=${GHC_VERSION_BUILD} \ CABAL_VERSION=${CABAL_VERSION_BUILD} -RUN apk upgrade --no-cache \ - && apk add --update --no-cache \ +RUN apk add --no-cache \ bash \ build-base \ bzip2 \ @@ -106,13 +105,14 @@ RUN cd /tmp \ && cd ghc-"$GHC_VERSION"-*-alpine-linux \ && ./configure --disable-ld-override \ && make install \ - && cd / \ && rm -rf /tmp/* FROM builder as tester WORKDIR /usr/local/src +WORKDIR /usr/local/src + COPY Main.hs Main.hs RUN ghc -static -optl-pthread -optl-static Main.hs \