diff --git a/Dockerfile b/Dockerfile index 4857acb..5ecfd08 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,13 +9,13 @@ RUN apt-get update && apt-get install -y ghc cabal-install # Install Haskell deps # (This is a separate copy/run so that source changes don't require rebuilding) COPY ShellCheck.cabal ./ -RUN cabal update && cabal install --dependencies-only +RUN cabal update && cabal install --dependencies-only --ghc-options="-optlo-Os -split-sections" # Copy source and build it COPY LICENSE Setup.hs shellcheck.hs ./ COPY src src RUN cabal build Paths_ShellCheck && \ - ghc -optl-static -optl-pthread -isrc -idist/build/autogen --make shellcheck && \ + ghc -optl-static -optl-pthread -isrc -idist/build/autogen --make shellcheck -split-sections -optc-Wl,--gc-sections -optlo-Os && \ strip --strip-all shellcheck RUN mkdir -p /out/bin && \