a78347ec16
Former-commit-id: 478c51b11c77f2cc72594f56cf3e0d18e779db08 Former-commit-id: be8a2379e919aaa9f1a7bb5a6aa4a63681c95659 [formerly c69f0265a20b644f7673a31bc18e020e011cda01] [formerly d9752a7bbdaf13a8a7a5b482d4866691a775e564 [formerly bcfe8e1f1323fb22782ad2c6990351fff619ed7e [formerly bcfe8e1f1323fb22782ad2c6990351fff619ed7e [formerly bcfe8e1f1323fb22782ad2c6990351fff619ed7e [formerly b4a2401804a0b9d486ab3d808b5bc97d4ff07176]]]]] Former-commit-id: b8643adec17060f8873f090735952efc5c86195f [formerly 1937d11238469e44a8273d6316104a28bfbcd9bc] Former-commit-id: dff1d167fed50471f8d64396ac83159f2b2b45a9 Former-commit-id: c39ee09c0ee001882ee4b4a48b294f13c202bf28 Former-commit-id: c817b85401e26a55fd4e33afda63a41d62399990 Former-commit-id: 5a5af585baf8cb35bb9d4e98e8e303c5606f9fbe [formerly fbc3149f3d0fd75a426c7b20fd20797dbab5874b] Former-commit-id: cce0f0ba7b1e8cf17c835057b4a6956728aab1f3
35 lines
903 B
Docker
35 lines
903 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
|
|
|
|
COPY --from=builder /root/.local/bin/wstunnel /
|
|
RUN adduser -D abc && chmod +x /wstunnel
|
|
|
|
USER abc
|
|
WORKDIR /
|
|
|
|
CMD ["/wstunnel"]
|
|
|