mirror of
https://github.com/3proxy/3proxy.git
synced 2026-04-12 16:00: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
67 lines
2.6 KiB
Docker
67 lines
2.6 KiB
Docker
# 3proxy.full is fully functional distroless 3proxy build
|
|
#
|
|
# Example are for podman, for docker change 'podman' to 'docker'
|
|
#
|
|
#to build:
|
|
# podman build -f Dockerfile.full -t 3proxy.full .
|
|
#to run:
|
|
#
|
|
# echo nserver 8.8.8.8 >/path/to/local/config/directory/3proxy.cfg
|
|
# echo proxy -p3129 >>/path/to/local/config/directory/3proxy.cfg
|
|
# podman run --read-only -p 3129:3129 -v /path/to/local/config/directory:/etc/3proxy -name 3proxy.full 3proxy.full
|
|
#
|
|
# use "log" without pathname in config to log to stdout.
|
|
# plugins are located in /usr/local/3proxy/libexec (/libexec for chroot config)
|
|
# symlinked as /lib and /lib64 in both root and chroot configurations, so no need
|
|
# to specify full path to plugin. SSLPlugin is supported.
|
|
#
|
|
# Since 0.9.6 image is distroless, no reason to use chroot, chroot
|
|
# configuration is supported for compatility only.
|
|
|
|
|
|
FROM docker.io/gcc AS buildenv
|
|
COPY . 3proxy
|
|
RUN cd 3proxy &&\
|
|
apt --assume-yes update && apt --assume-yes install libssl-dev libpcre2-dev &&\
|
|
make -f Makefile.Linux &&\
|
|
strip bin/3proxy &&\
|
|
mkdir /dist &&\
|
|
mkdir /dist/etc &&\
|
|
mkdir /dist/etc/3proxy &&\
|
|
mkdir /dist/bin &&\
|
|
mkdir /dist/usr &&\
|
|
mkdir /dist/usr/local &&\
|
|
mkdir /dist/usr/local/3proxy &&\
|
|
mkdir /dist/usr/local/3proxy/libexec &&\
|
|
mkdir /dist/usr/local/3proxy/conf &&\
|
|
cp bin/3proxy /dist/bin &&\
|
|
cp bin/*.so /dist/usr/local/3proxy/libexec &&\
|
|
cp scripts/3proxy.cfg.inchroot /dist/etc/3proxy/3proxy.cfg
|
|
RUN cd /dist &&\
|
|
ln -s /usr/local/3proxy/libexec lib64 &&\
|
|
ln -s /usr/local/3proxy/libexec lib &&\
|
|
ln -s /usr/local/3proxy/libexec usr/lib &&\
|
|
ln -s /usr/local/3proxy/libexec usr/lib64 &&\
|
|
ln -s /usr/local/3proxy/libexec /dist/usr/local/3proxy/libexec/`gcc -dumpmachine` &&\
|
|
cp /lib64/ld-*.so.* /dist/usr/local/3proxy/libexec &&\
|
|
cp "/lib/`gcc -dumpmachine`"/libc.so.* /dist/usr/local/3proxy/libexec &&\
|
|
cp "/lib/`gcc -dumpmachine`"/libdl.so.* /dist/usr/local/3proxy/libexec &&\
|
|
cp "/lib/`gcc -dumpmachine`"/libcrypto.so.* /dist/usr/local/3proxy/libexec &&\
|
|
cp "/lib/`gcc -dumpmachine`"/libssl.so.* /dist/usr/local/3proxy/libexec &&\
|
|
cp "/lib/`gcc -dumpmachine`"/libpcre2-8.so.* /dist/usr/local/3proxy/libexec &&\
|
|
cp "/lib/`gcc -dumpmachine`"/libz.so.* /dist/usr/local/3proxy/libexec &&\
|
|
cp "/lib/`gcc -dumpmachine`"/libzstd.so.* /dist/usr/local/3proxy/libexec
|
|
RUN cd /dist/usr/local/3proxy/ &&\
|
|
ln -s libexec lib &&\
|
|
ln -s libexec lib64 &&\
|
|
mkdir usr
|
|
RUN cd /dist/usr/local/3proxy/usr &&\
|
|
ln -s ../libexec lib &&\
|
|
ln -s ../libexec lib64 &&\
|
|
strip /dist/usr/local/3proxy/libexec/*.so &&\
|
|
ls -lR /dist
|
|
|
|
FROM scratch
|
|
COPY --from=buildenv /dist /
|
|
CMD ["/bin/3proxy", "/etc/3proxy/3proxy.cfg"]
|