Skip to content

Commit

Permalink
fix static binary build
Browse files Browse the repository at this point in the history
  • Loading branch information
Romain GÉRARD committed Jul 27, 2018
1 parent 675d431 commit ce6e05d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM alpine:3.6 as builder
FROM alpine:3.8 as builder
MAINTAINER [email protected]

RUN apk --no-cache add --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \
ca-certificates git ghc upx curl musl-dev gmp-dev zlib-dev pcre-dev libx11-dev libxrandr-dev
RUN curl -sSL https://get.haskellstack.org/ | sh
ca-certificates git ghc=8.4.3-r0 upx curl musl-dev gmp-dev zlib-dev pcre-dev libx11-dev libxrandr-dev
RUN curl -L https://github.com/commercialhaskell/stack/releases/download/v1.6.5/stack-1.6.5-linux-x86_64-static.tar.gz | tar -xz ; \
cp stack-1.6.5-linux-x86_64-static/stack /usr/bin/

COPY stack.yaml /mnt
COPY *.cabal /mnt
Expand All @@ -21,7 +22,7 @@ RUN upx --ultra-brute /root/.local/bin/greenclip



FROM alpine:latest as runner
FROM alpine:3.8 as runner
MAINTAINER [email protected]

WORKDIR /root
Expand Down
2 changes: 2 additions & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ resolver: lts-12.2
# will not be run. This is useful for tweaking upstream packages.
packages:
- '.'
#- 'X11-1.9'

# Dependency packages to be pulled from upstream that are not in the resolver
# (e.g., acme-missiles-0.3)
extra-deps:
- 'wordexp-0.2.2'
- 'X11-1.8'

# Override default flag values for local packages and extra-deps
flags: {}
Expand Down

0 comments on commit ce6e05d

Please sign in to comment.