wstunnel/Dockerfile
Erèbe 13305ffe5d Add travis
Former-commit-id: 09fc8c6c50b11bc608750cd6f0557c357dab60fd
Former-commit-id: 2d9292b8b41f5c4cf5d4b797acd122b85f6f9e34 [formerly 8888763d73b0192d862eea77c6a98f635a928bcb] [formerly 4012b458d4e377a0d520646b3e335c723fb2bb4d [formerly ba8fa500646528eac9824da960090abff6a87825 [formerly ba8fa500646528eac9824da960090abff6a87825 [formerly ba8fa500646528eac9824da960090abff6a87825 [formerly 61da55d5ef3d92265cce865b080ec412e7efebda]]]]]
Former-commit-id: 10b41c3494e37100124a9eeb91d3d7bb478c9e1a [formerly c814d5718f1d822b3ca55841da75fa684fe85ab6]
Former-commit-id: 706617a4793c8a255087a5bd9c0dcc6e5e423c67
Former-commit-id: 83ca480f175e69aa0f0852076d5f0dc5fba4e0f5
Former-commit-id: 9887c0f06b06cbe09a9955f5a4034b19b80651dd
Former-commit-id: 40e64761f32190edf62646e45e588fd4e2d9b07a [formerly 333943ca003a3b630c8923f33a1618f32e64ee23]
Former-commit-id: 6aba987c30076b5806a7ab7d85de0d81f14227b8
2017-12-05 12:32:35 +01:00

32 lines
881 B
Docker

FROM alpine:3.6 as builder
MAINTAINER github@erebe.eu
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
RUN curl -sSL https://get.haskellstack.org/ | sh
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 -Wl,--unresolved-symbols=ignore-all' >> 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"]