This commit is contained in:
Paramtamtam
2020-07-11 11:49:43 +05:00
parent 6d94db1ba6
commit 04fb12076c
6 changed files with 49 additions and 48 deletions

View File

@@ -6,11 +6,9 @@ ARG VERSION="0.8.13"
RUN set -x \
&& apk add --no-cache \
ca-certificates \
linux-headers \
build-base \
git \
&& update-ca-certificates \
&& git clone --branch ${VERSION} https://github.com/z3APA3A/3proxy.git /tmp/3proxy \
&& cd /tmp/3proxy \
&& echo '#define ANONYMOUS 1' >> /tmp/3proxy/src/3proxy.h \
@@ -18,6 +16,9 @@ RUN set -x \
FROM alpine:latest
# e.g.: `docker build --build-arg "BUILD_DATE=`date -u +'%Y-%m-%dT%H:%M:%SZ'`" .`
ARG BUILD_DATE
LABEL \
org.label-schema.name="3proxy" \
org.label-schema.description="Tiny free proxy server" \
@@ -25,13 +26,13 @@ LABEL \
org.label-schema.vcs-url="https://github.com/tarampampam/3proxy-docker" \
org.label-schema.docker.cmd="docker run --rm -d -p \"3128:3128/tcp\" -p \"1080:1080/tcp\" this_image" \
org.label-schema.vendor="tarampampam" \
org.label-schema.build-date="$BUILD_DATE" \
org.label-schema.license="WTFPL" \
org.label-schema.schema-version="1.0"
COPY 3proxy.cfg /etc/3proxy/3proxy.cfg
COPY docker-entrypoint.sh /docker-entrypoint.sh
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /tmp/3proxy/src/3proxy /usr/bin/3proxy
COPY --from=builder /tmp/3proxy/cfg/3proxy.cfg.sample /etc/3proxy/3proxy.cfg
RUN set -x \
# Unprivileged user creation <https://stackoverflow.com/a/55757473/12429735RUN>
@@ -43,7 +44,6 @@ RUN set -x \
--no-create-home \
--uid 10001 \
3proxy \
&& touch /etc/3proxy/passwd \
&& chown 3proxy:3proxy -R /etc/3proxy
# Use an unprivileged user