mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 15:59:41 +08:00
Update dockerfiles
This commit is contained in:
1 parent
c5abe51e26
commit
336a4acd46
2 files changed
+67
-13
No files matched your search
+12
-13
@@ -1,10 +1,9 @@
|
||||
# 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.
|
||||
# nserver is required for DNS resolutions (system resolver will not work).
|
||||
#
|
||||
# This is "scratch" docker with only 3proxy static executable and empty non-writable "run" directory.
|
||||
# This is busybox based docker with only 3proxy static executable and empty non-writable "run" directory.
|
||||
#
|
||||
# "plugin" and "system" are not supported
|
||||
# "plugin" is not supported
|
||||
#
|
||||
# Build:
|
||||
#
|
||||
@@ -22,22 +21,22 @@
|
||||
#<proxy -p3129
|
||||
#<end
|
||||
#
|
||||
# use "chroot run 65536 65536" in config for safe chroot environment
|
||||
# use "chroot run 65536 65536" in config for safe chroot environment. nserver is required for DNS resolutions in chroot.
|
||||
|
||||
|
||||
FROM gcc AS buildenv
|
||||
COPY . /3proxy
|
||||
RUN cd /3proxy &&\
|
||||
echo "">>Makefile.Linux&&\
|
||||
echo LDFLAGS = -fPIE -static -O2 -fno-strict-aliasing -pthread >>Makefile.Linux&&\
|
||||
echo LDFLAGS = -fPIE -O2 -fno-strict-aliasing -pthread >>Makefile.Linux&&\
|
||||
echo PLUGINS = >>Makefile.Linux&&\
|
||||
echo LIBS = >>Makefile.Linux&&\
|
||||
echo CFLAGS = -g -fPIC -O2 -fno-strict-aliasing -c -pthread -DWITHSPLICE -D_GNU_SOURCE -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL -DWITH_NETFILTER -DNOPLUGINS >>Makefile.Linux&&\
|
||||
make -f Makefile.Linux&&\
|
||||
cp bin/3proxy .&&\
|
||||
strip 3proxy&&\
|
||||
mkdir run&&\
|
||||
chmod 555 run
|
||||
strip bin/3proxy
|
||||
|
||||
|
||||
FROM scratch
|
||||
COPY --from=buildenv 3proxy .
|
||||
COPY --from=buildenv run .
|
||||
CMD ["./3proxy"]
|
||||
FROM busybox:glibc
|
||||
COPY --from=buildenv /3proxy/bin/3proxy /bin/3proxy
|
||||
RUN mkdir /run && chmod 555 /run
|
||||
CMD ["/bin/3proxy"]
|
||||
Reference in new issue
Block a user