4b53d282a0
Former-commit-id: 79e56222176e25c5b7e1113d321fff0605495dfc Former-commit-id: ca1540e0b1e73981dd12006593444d7899405616 [formerly 31c1128af664ac4c3d0a7d8b52ea4550d89d6ff7] [formerly 67d9ac73b3e204db7744753e4dcb66a5c059d041 [formerly 2da58647b3a469550d6b3a36bd5dbb83959f1252 [formerly 0443a4b66370772c8ccc1fc9d52c638da3048588] [formerly 0443a4b66370772c8ccc1fc9d52c638da3048588 [formerly 0443a4b66370772c8ccc1fc9d52c638da3048588 [formerly e7c2c9ae40515ca7ff4ce96e86480f3365e7bd06]]]]] Former-commit-id: 60a39018f68422f8a97344b2c5c5493945f7715f [formerly 51716dd8c119ce8c182fd4cf52301ea086ede9d9] Former-commit-id: 05c205ec8c2ccbd712ce55dfde56d6fab8339642 Former-commit-id: 5354c852dc301464555e70d45621b84519707b4c Former-commit-id: 7793a91521998db939f16cd9e59982be5d705176 Former-commit-id: ba89d8ec07e4898b7f01b14c8917690834d0cb63 [formerly 5d3f566b37ec9318fea4f495cd93d2f9dc964420] Former-commit-id: 13fbfe547852d6ae0d73de2085dc9c705bcb4c9d
33 lines
881 B
Docker
33 lines
881 B
Docker
FROM alpine:3.12 as builder
|
|
MAINTAINER github@erebe.eu
|
|
|
|
RUN apk --no-cache add ca-certificates git ghc curl musl-dev gmp-dev zlib-dev zlib-static pcre-dev xz make upx
|
|
RUN curl -sSL https://github.com/commercialhaskell/stack/releases/download/v2.1.3/stack-2.1.3-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" --only-dependencies
|
|
|
|
COPY . /mnt
|
|
|
|
RUN echo ' ld-options: -static' >> wstunnel.cabal ; \
|
|
stack install --split-objs --ghc-options="-fPIC"
|
|
#RUN upx /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"]
|
|
|