Support network >= 3.1.2 (#107)
* Bump to stackage LTS 19.2 for network >= 3.1.2 * Support network >= 3.1.2 * Disable docker login on forked repositories. * Update dockerfile. Former-commit-id: 34645524c3221a596fb59e8dbad4381f10f93933 Former-commit-id: bcc40487b5cc36af72bcccfabb77fc2fe3933377 [formerly 36e5a23cc5f50719fbc334741e41101527e44a32] [formerly 35b7f5ad0096ba3e1ba2b3946e9eb46d17b477c5 [formerly c1e83ef29175f48c1bc199405670ac70a85d7bfa [formerly c3d180e0a066c83db261f296055e0fc6485f85cd] [formerly 29ca68bf69f44df5770d665f1997fce6afe8c6a9] [formerly 29ca68bf69f44df5770d665f1997fce6afe8c6a9 [formerly 29ca68bf69f44df5770d665f1997fce6afe8c6a9 [formerly dd31ffea070f0cccf6fb8064ea6f445a2d8b3d7c]]]]] Former-commit-id: d9e2f84d44728723b9ddcbad5ae1d088fdf574b2 [formerly ccdba4b1ec6a29b032c7696f8d6893940f44c25c] Former-commit-id: 10137d6047496f188dc4d29f31ab21452aedb7ad Former-commit-id: 0549973a0980949a8743f6cac6ea5f265ccdd583 Former-commit-id: 061811becd00ed2022ed1c6c35c7aee484dccdf6 Former-commit-id: 20ac5d98e082c67e650a6bcf63d380ba08973ade [formerly 2ce99e6abc267a2f1db82ee0ed3f5ce762ecabb2] Former-commit-id: b1be9c6813f3c3f1a9ffa8cd3915954cbc902723
This commit is contained in:
parent
566fd2e923
commit
748b329514
5 changed files with 11 additions and 17 deletions
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
|
@ -11,6 +11,7 @@ jobs:
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
|
if: github.repository == 'erebe/wstunnel'
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
|
@ -29,7 +30,7 @@ jobs:
|
||||||
id: docker_build_wstunnel
|
id: docker_build_wstunnel
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
push: true
|
push: ${{ github.repository == 'erebe/wstunnel' && github.ref == 'refs/heads/master' }}
|
||||||
tags: ghcr.io/erebe/wstunnel:latest
|
tags: ghcr.io/erebe/wstunnel:latest
|
||||||
|
|
||||||
# - name: extract Artifact
|
# - name: extract Artifact
|
||||||
|
|
19
Dockerfile
19
Dockerfile
|
@ -1,30 +1,23 @@
|
||||||
# Build Cache image
|
# Build Cache image
|
||||||
FROM alpine:3.12 as builder-cache
|
FROM fpco/stack-build-small:lts-19.2 as builder-cache
|
||||||
|
|
||||||
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 stack.yaml /mnt
|
||||||
COPY *.cabal /mnt
|
COPY *.cabal /mnt
|
||||||
WORKDIR /mnt
|
WORKDIR /mnt
|
||||||
RUN sed -i 's/lts-16.25/lts-16.4/' stack.yaml && \
|
RUN rm -rf ~/.stack && \
|
||||||
rm -rf ~/.stack && \
|
|
||||||
stack config set system-ghc --global true && \
|
stack config set system-ghc --global true && \
|
||||||
stack setup && \
|
stack setup && \
|
||||||
stack install --split-objs --ghc-options="-fPIC" --only-dependencies
|
stack install --ghc-options="-fPIC" --only-dependencies
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Build phase
|
# Build phase
|
||||||
#FROM builder-cache as builder
|
FROM builder-cache as builder
|
||||||
FROM ghcr.io/erebe/wstunnel:build-cache as builder
|
# FROM ghcr.io/erebe/wstunnel:build-cache as builder
|
||||||
COPY . /mnt
|
COPY . /mnt
|
||||||
|
|
||||||
RUN sed -i 's/lts-16.25/lts-16.4/' stack.yaml
|
|
||||||
RUN echo ' ld-options: -static' >> wstunnel.cabal ; \
|
RUN echo ' ld-options: -static' >> wstunnel.cabal ; \
|
||||||
stack install --split-objs --ghc-options="-fPIC"
|
stack install --ghc-options="-fPIC"
|
||||||
#RUN upx /root/.local/bin/wstunnel
|
#RUN upx /root/.local/bin/wstunnel
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ defaultRecvBufferSize = unsafeDupablePerformIO $
|
||||||
bracket (N.socket N.AF_INET N.Stream 0) N.close (\sock -> N.getSocketOption sock N.RecvBuffer)
|
bracket (N.socket N.AF_INET N.Stream 0) N.close (\sock -> N.getSocketOption sock N.RecvBuffer)
|
||||||
|
|
||||||
sO_MARK :: N.SocketOption
|
sO_MARK :: N.SocketOption
|
||||||
sO_MARK = N.CustomSockOpt (1, 36) -- https://elixir.bootlin.com/linux/latest/source/arch/alpha/include/uapi/asm/socket.h#L64
|
sO_MARK = N.SockOpt 1 36 -- https://elixir.bootlin.com/linux/latest/source/arch/alpha/include/uapi/asm/socket.h#L64
|
||||||
|
|
||||||
{-# NOINLINE sO_MARK_Value #-}
|
{-# NOINLINE sO_MARK_Value #-}
|
||||||
sO_MARK_Value :: IORef Int
|
sO_MARK_Value :: IORef Int
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
# resolver:
|
# resolver:
|
||||||
# name: custom-snapshot
|
# name: custom-snapshot
|
||||||
# location: "./custom-snapshot.yaml"
|
# location: "./custom-snapshot.yaml"
|
||||||
resolver: lts-16.25
|
resolver: lts-19.2
|
||||||
|
|
||||||
# User packages to be built.
|
# User packages to be built.
|
||||||
# Various formats can be used as shown in the example below.
|
# Various formats can be used as shown in the example below.
|
||||||
|
|
|
@ -26,7 +26,7 @@ library
|
||||||
, connection
|
, connection
|
||||||
, hslogger
|
, hslogger
|
||||||
, mtl
|
, mtl
|
||||||
, network
|
, network >= 3.1.2
|
||||||
, network-conduit-tls
|
, network-conduit-tls
|
||||||
, streaming-commons
|
, streaming-commons
|
||||||
, text >= 1.2.2.1
|
, text >= 1.2.2.1
|
||||||
|
|
Loading…
Reference in a new issue