mirror of
https://github.com/3proxy/3proxy.git
synced 2026-08-05 17:20:11 +08:00
Some checks are pending
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
55 lines
1.9 KiB
Docker
55 lines
1.9 KiB
Docker
# dockerfile for "interactive" minimal 3proxy execution, no configuration mounting is required, configuration
|
|
# is accepted from stdin. Use "end" command to indicate the end of configuration. Use "log" for stdout logging.
|
|
#
|
|
# Examples are for podman. For docker change 'podman' to 'docker'.
|
|
#
|
|
# This is a scratch-based docker with statically linked 3proxy executable
|
|
# built against musl and wolfSSL.
|
|
#
|
|
# Limitations for minimal version:
|
|
# no support for plugins and system resolver.
|
|
# 'nserver' or 'fakeresolve' are mandatory in configuration.
|
|
#
|
|
# Build:
|
|
#
|
|
# podman build -f Dockerfile.minimal -t 3proxy.minimal .
|
|
#
|
|
# Run example:
|
|
#
|
|
# podman run --read-only -i -p 3129:3129 --name 3proxy 3proxy.minimal
|
|
#or
|
|
# podman start -ai 3proxy
|
|
#<nserver 8.8.8.8
|
|
#<nscache 65535
|
|
#<log
|
|
#<proxy -p3129
|
|
#<end
|
|
#
|
|
|
|
FROM docker.io/alpine:latest AS wolfssl
|
|
RUN apk add --no-cache build-base curl autoconf automake libtool linux-headers
|
|
RUN TAG=$(curl -s https://api.github.com/repos/wolfSSL/wolfssl/releases/latest \
|
|
| sed -n 's/.*"tag_name": *"\([^"]*\)".*/\1/p') && \
|
|
echo "wolfssl tag: $TAG" && \
|
|
curl -sL https://api.github.com/repos/wolfSSL/wolfssl/tarball/$TAG -o /tmp/w.tar.gz && \
|
|
mkdir /src && tar -xzf /tmp/w.tar.gz -C /src --strip-components=1 && \
|
|
cd /src && \
|
|
autoreconf -i && \
|
|
./configure --enable-opensslextra --enable-opensslall --enable-certgen \
|
|
--enable-tls13 --enable-sni --enable-session-ticket \
|
|
--enable-static --disable-shared --prefix=/usr/local && \
|
|
make -j$(nproc) && make install
|
|
|
|
FROM docker.io/alpine:latest AS buildenv
|
|
RUN apk add --no-cache gcc make musl-dev
|
|
COPY --from=wolfssl /usr/local /usr/local
|
|
COPY . 3proxy
|
|
RUN cd 3proxy && mkdir -p bin &&\
|
|
make -f Makefile.Linux STATIC=true WOLFSSL_CHECK=true \
|
|
EXTRA_LDFLAGS="-L/usr/local/lib" &&\
|
|
strip bin/3proxy
|
|
|
|
FROM scratch
|
|
COPY --from=buildenv 3proxy/bin/3proxy /bin/3proxy
|
|
CMD ["/bin/3proxy"]
|