2e53928d19
Former-commit-id: 04815d93a8c7e12b2bbeb8d3c6fe55c5cb6af2e0 Former-commit-id: cd37ae36b0fe0b47de29d1d360981136d5f76d24 [formerly b008b9df45b8fcb10ed8be4b80e8c2dc9494ebf5] [formerly 23a42072130b97d8e92ca59d81448f44a5f2c216 [formerly e03828f54cdb79ca12df4423bd9c9dcbc9bf441c [formerly e03828f54cdb79ca12df4423bd9c9dcbc9bf441c [formerly e03828f54cdb79ca12df4423bd9c9dcbc9bf441c [formerly fcb61dbccaeb639d22599a9bf585fe74880dc2c6]]]]] Former-commit-id: bf839c3dc1a3e2d4b56c4cbb772134837f52480a [formerly e9cd21213817c2fa87a09133f52fe8b8d8e5e494] Former-commit-id: a6680fac8ecfcfe8a079049ff5745d18a6e6ed2e Former-commit-id: 133ec29d50da20b3928de5387a898c3c788dfef3 Former-commit-id: 9375011361e0198ff7141526646603fdd81dba77 Former-commit-id: 5d24b611072f677088ea152c91a9d6a450c52d65 [formerly 34da7e99e16e7de318d4a54f06c76f34fa256490] Former-commit-id: 9d0a25506322e55d9c59d1210c0e9fe17239b401
34 lines
962 B
Docker
34 lines
962 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://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"]
|
|
|