a47bb20e44
Former-commit-id: cddbcef37ebe9a8f683659d87ba195da429d0fdd Former-commit-id: 48764647f6e538039f3d383742e89c8839e99174 [formerly d333233a4eb32cbc7f90c18819ba3720e7043730] [formerly 7ca3407d95caae0b3103da1f1244c5483914f9de [formerly dff7c158337a0ae0bd98de7605ae859e244db4cd [formerly f8846510486f822294202a97b5b1ea3e25025e3e] [formerly f8846510486f822294202a97b5b1ea3e25025e3e [formerly f8846510486f822294202a97b5b1ea3e25025e3e [formerly 3a4793bd556c88c063419220faae4669427c8493]]]]] Former-commit-id: cf5d3444897186021d40396f4fb8daa820954890 [formerly f92cbca0cf854f50ee1cb7373492709444a8e5fd] Former-commit-id: e3edb9ae9523575907d858e4f401c70042486368 Former-commit-id: 1b62171a793c665623c0dfb8a97d3104809dcf42 Former-commit-id: 737061cd2adeea521e2f1cf31d434dc73f6a6c27 Former-commit-id: ea9fa483b758dfc15959d7e14207620032c3f844 [formerly 92993f8c81db2d474afddd03bd24f679245c8032] Former-commit-id: 07bfbcf39b8c0f452f7c06001d4a141815a0f01c
33 lines
881 B
Docker
33 lines
881 B
Docker
FROM alpine:3.11 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"]
|
|
|