4a8f0fe9cb
Former-commit-id: 7d40ac1466f37affeba247550fa2cce8a3189129 Former-commit-id: a4475e21db73c9b8d38c3722288589c8df373327 [formerly 1c8d86c0ce539e2aaa2e963b7a51b045925b3464] [formerly 54a79ea484795facf696f4ede80a852a166fc5af [formerly 3b7e568be180e00b4345126955bf7fb3aa06575d [formerly 3b7e568be180e00b4345126955bf7fb3aa06575d [formerly e692833babe209399528a0a5d30ece79ac07681d]] [formerly 3b7e568be180e00b4345126955bf7fb3aa06575d [formerly e692833babe209399528a0a5d30ece79ac07681d] [formerly e692833babe209399528a0a5d30ece79ac07681d [formerly c9b1cd3de72252ed8e411ba78c30082cd74eda5d]]]]] Former-commit-id: 6157c2a7472e53ae445cfbac0cb4877ebc54be97 [formerly d4085927fed840c2f6d78061e304420a03a50030] Former-commit-id: c8c19775ce0164231aa02d3d54864931edc47cda Former-commit-id: 5a7b764691fdc501de2a75b6157383c22cb55873 Former-commit-id: 1748a4e6dc63966c85e4ef9c83cacd4eff9651c8 Former-commit-id: 4ee8cc448620476e4a20012f974c002ca3a34346 [formerly ab3c0666f3d0fb032188e3a01852e2dee3745f78] Former-commit-id: 921e902fd69abfef3fb8feb48cb6f56ecb338b86
34 lines
907 B
Docker
34 lines
907 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 adduser -D abc && chmod +x ./wstunnel
|
|
USER abc
|
|
|
|
CMD ["/wstunnel"]
|
|
|