wstunnel/Dockerfile
Romain GÉRARD b77b6321e7 fix: Pin version correctly in Dockerfile
Former-commit-id: 4312fe34f9963356cd77a3273aabce4880a22d55
Former-commit-id: 2a67b0d7dcee87a8373f8918947fce64480e6b9f [formerly ef2fe361cbb10801cde0b73c517797f95dce489d] [formerly 76979b59efd27c23d2ce84fc2e37a6bc5267e2f7 [formerly 2ee943525f9872d444fc200d3688d2f9a74653be [formerly 2d60ad224a6475506120116c82804c87d4e5c01f] [formerly 2d60ad224a6475506120116c82804c87d4e5c01f [formerly 2d60ad224a6475506120116c82804c87d4e5c01f [formerly 1947b081b5af2965a982d995021124564f7a902a]]]]]
Former-commit-id: 22c4c1467f3d17a843bb83c7b3033127c19df0cb [formerly 7331124d0cd3fe47ca0053c1aa630e38e5eba869]
Former-commit-id: 82ad8052a770e7743dddcca2ecc9a887c4ada176
Former-commit-id: a7bab0173aa9b6883ca0230cb4d5a9ffd8aef062
Former-commit-id: 2b49acbbfbfe815d68a899cf5650eba895eacfdd
Former-commit-id: 59592735d0bc8e404dcd6cc858273fb8924f2257 [formerly 401ac1fd2586d9aea2fd7a7df292b32564029532]
Former-commit-id: e8d8f669db97f9216d9d873811c29e165c34bd4f
2018-12-27 14:37:34 +01:00

34 lines
983 B
Docker

FROM alpine:3.6 as builder
MAINTAINER github@erebe.eu
RUN apk --no-cache add ca-certificates git ghc curl musl-dev gmp-dev zlib-dev pcre-dev xz make
RUN apk --no-cache add --repository http://dl-cdn.alpinelinux.org/alpine/v3.8/community upx
RUN curl -sSL https://github.com/commercialhaskell/stack/releases/download/v1.6.5/stack-1.6.5-linux-x86_64-static.tar.gz | tar xvz && \
mv stack*/stack /usr/bin
COPY stack.yaml /mnt
COPY *.cabal /mnt
WORKDIR /mnt
RUN rm -rf ~/.stack && \
stack config set system-ghc --global true && \
stack setup && \
stack install --split-objs --ghc-options="-fPIC -fllvm" --only-dependencies
COPY . /mnt
RUN echo ' ld-options: -static' >> wstunnel.cabal ; \
stack install --split-objs --ghc-options="-fPIC -fllvm"
RUN upx --ultra-brute /root/.local/bin/wstunnel
FROM alpine:latest as runner
MAINTAINER github@erebe.eu
WORKDIR /root
COPY --from=builder /root/.local/bin/wstunnel .
RUN chmod +x ./wstunnel
CMD ["./wstunnel"]