bf6e52b11d
Former-commit-id: e6029ec947d9bbd57736f75e4d527371d0e5e67c Former-commit-id: d5aa97b763cd20a50db1a629a3d028b7e26e419e [formerly 7a25d52af2b2bfad4e11394426aa46cef92cd159] [formerly b665f4037f79519f18e498e64a4a534340c5b9d5 [formerly 8429e33118f9e554838b16fc9b5ea648d6bd3119 [formerly 8429e33118f9e554838b16fc9b5ea648d6bd3119 [formerly 8429e33118f9e554838b16fc9b5ea648d6bd3119 [formerly 47ec3d536c2c129e23e65f428ea3c71774ebc2c4]]]]] Former-commit-id: 3724c1a8e6f9ff5e67f0e4854ac25bbb7a640f3a [formerly 491cf5deb88622bb470644675c6fb2b07f276b13] Former-commit-id: 09145bd043c64b6f57585a40dbd7fd4fcc9215f8 Former-commit-id: f2c327d2b7ee49663a13eb92b80553c046f80f72 Former-commit-id: b33f7b09e3e811eca2eb6281c893de83fc9a9d34 Former-commit-id: de56c08f0a2eabab319c43d6a01234cdcce0cd87 [formerly ff74d75e033e2600a644a9740796249fae740a8b] Former-commit-id: 95107ef9a6edee47ae23d5039eb67a889ad0cad8
32 lines
845 B
Docker
32 lines
845 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://get.haskellstack.org/ | sh
|
|
|
|
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"]
|
|
|