From ab3f3da4d8b6a716e4d450dc003df01088ea1664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emma=20Bast=C3=A5s?= Date: Mon, 15 Mar 2021 18:30:22 +0100 Subject: [PATCH] Change Dockerfile to fit elm-embed --- installers/linux/Dockerfile | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/installers/linux/Dockerfile b/installers/linux/Dockerfile index 3b6df3f6..86fce97c 100644 --- a/installers/linux/Dockerfile +++ b/installers/linux/Dockerfile @@ -1,13 +1,13 @@ # Based initially on https://gist.github.com/rlefevre/1523f47e75310e28eee243c9c5651ac9 # # Build Linux x64 binary from elm compiler top-level directory: -# $ docker build -t elm -f installers/linux/Dockerfile . +# $ docker build -t elm-embed -f installers/linux/Dockerfile . # # Retrieve elm Linux binary: -# $ docker cp $(docker create elm):/usr/local/bin/elm DESTINATION_DIRECTORY +# $ docker cp $(docker create elm-embed):/usr/local/bin/elm-embed DESTINATION_DIRECTORY # -# Delete docker elm image: -# $ docker rmi elm +# Delete docker elm-embed image: +# $ docker rmi elm-embed # # Display all images: # $ docker images -a @@ -21,19 +21,18 @@ FROM alpine:3.11 # Install packages required to build elm RUN apk add --no-cache ghc cabal wget musl-dev zlib-dev zlib-static ncurses-dev ncurses-static -WORKDIR /elm +WORKDIR /elm-embed # Import source code COPY builder builder COPY compiler compiler -COPY reactor reactor COPY terminal terminal -COPY cabal.config elm.cabal LICENSE ./ +COPY cabal.config elm-embed.cabal LICENSE ./ # Build statically linked elm binary RUN cabal new-update RUN cabal new-build --ghc-option=-optl=-static --ghc-option=-split-sections -RUN cp ./dist-newstyle/build/x86_64-linux/ghc-*/elm-*/x/elm/build/elm/elm /usr/local/bin/elm +RUN cp ./dist-newstyle/build/x86_64-linux/ghc-*/elm-embed-*/x/elm-embed/build/elm-embed/elm-embed /usr/local/bin/elm-embed # Remove debug symbols to optimize the binary size -RUN strip -s /usr/local/bin/elm +RUN strip -s /usr/local/bin/elm-embed