Make stdio server one shot. Exit when stdin close or cnx break
Former-commit-id: 88761398962764745bc495314aca962e728ca8bc [formerly ec5245e4e8582cac1acea8fce93960b10e1355ab] [formerly a646606c4757a7d95717e61a530268b53a55194e [formerly 90a8177d55b2e9cda3b8b9f2786a5acefa42967d]] Former-commit-id: a4f3b053093aa350adbff3a77cfb5d5b2e3aed1c [formerly 0e601f35539a884b3de44b080e45113e4ca0c2ce] Former-commit-id: dca46be4453bdd312262edb9ba34cc58eda7bfe7 Former-commit-id: 9da4d6d8f74375d25a98d967a7a78ec1e4287780 Former-commit-id: 69fcfe79afd0f2373753dfc854511ca8072cc77d Former-commit-id: d6c7c44c03f3d633e14d7f6256db44d33201e95b [formerly dfd19ae45fce99c663acf1de25b4a4cf448d4e3a] Former-commit-id: 7c0201b20d79c4819644d844910d6a60da772bba
This commit is contained in:
parent
bcb2617b9d
commit
8c611e9149
23 changed files with 1971 additions and 2040 deletions
37
Dockerfile
37
Dockerfile
|
@ -1,37 +0,0 @@
|
|||
# Build Cache image
|
||||
FROM fpco/stack-build-small:lts-19.2 as builder-cache
|
||||
|
||||
COPY stack.yaml /mnt
|
||||
COPY *.cabal /mnt
|
||||
WORKDIR /mnt
|
||||
RUN rm -rf ~/.stack && \
|
||||
stack config set system-ghc --global true && \
|
||||
stack setup && \
|
||||
stack install --ghc-options="-fPIC" --only-dependencies
|
||||
|
||||
|
||||
|
||||
# Build phase
|
||||
FROM builder-cache as builder
|
||||
# FROM ghcr.io/erebe/wstunnel:build-cache as builder
|
||||
COPY . /mnt
|
||||
|
||||
RUN echo ' ld-options: -static' >> wstunnel.cabal ; \
|
||||
stack install --ghc-options="-fPIC"
|
||||
#RUN upx /root/.local/bin/wstunnel
|
||||
|
||||
|
||||
|
||||
# Final Image
|
||||
FROM alpine:latest as runner
|
||||
|
||||
LABEL org.opencontainers.image.source https://github.com/erebe/server
|
||||
|
||||
COPY --from=builder /root/.local/bin/wstunnel /
|
||||
RUN adduser -D abc && chmod +x /wstunnel
|
||||
|
||||
USER abc
|
||||
WORKDIR /
|
||||
|
||||
CMD ["/wstunnel"]
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue