From 5dd041122e647b2e8a2977520a86aa0146e29549 Mon Sep 17 00:00:00 2001 From: z3APA3A <3APA3A@3proxy.ru> Date: Fri, 27 Nov 2020 15:21:05 +0300 Subject: [PATCH] Create Dockerfile.minimal --- Dockerfile.minimal | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Dockerfile.minimal diff --git a/Dockerfile.minimal b/Dockerfile.minimal new file mode 100644 index 0000000..7b063be --- /dev/null +++ b/Dockerfile.minimal @@ -0,0 +1,43 @@ +# 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. +# +# "plugin" and "system" are not supported +# +# Build: +# +# docker build -f Dockerfile.minimal -t 3proxy.minimal . +# +# Run example: +# +# docker run -i -p 3129:3129 --name 3proxy 3proxy.minimal +#or +# docker start -i 3proxy +#>Makefile.Linux&&\ + echo LDFLAGS = -fPIE -static -O2 -fno-strict-aliasing -pthread >>Makefile.Linux&&\ + echo PLUGINS = >>Makefile.Linux&&\ + make -f Makefile.Linux&&\ + cp bin/3proxy .&&\ + strip 3proxy&&\ + mkdir run&&\ + chmod 555 run + +FROM scratch +COPY --from=buildenv 3proxy . +COPY --from=buildenv run . +CMD ["./3proxy"]