-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (40 loc) · 1.05 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM debian:9
LABEL version="0.3"
LABEL maintainer="rozha"
ARG THREEPROXY_VERSION=0.8.13
ADD 3proxy.cfg /etc
RUN apt-get update && apt-get -y dist-upgrade && \
#
apt-get -y --no-install-recommends install \
gcc \
git \
make \
libc6-dev \
ca-certificates \
&& \
#
git clone -b $THREEPROXY_VERSION https://github.com/z3APA3A/3proxy /tmp/3proxy && \
make -C /tmp/3proxy -f Makefile.Linux && \
strip -s /tmp/3proxy/src/3proxy && \
mv /tmp/3proxy/src/3proxy /usr/local/bin && \
#
groupadd -g 666 3proxy && \
useradd -u 666 -g 666 3proxy && \
chown root:3proxy /etc/3proxy.cfg && \
chmod 640 /etc/3proxy.cfg && \
mkdir -m 700 -p /var/log/3proxy && \
chown 3proxy:3proxy /var/log/3proxy && \
#
apt-get -y purge \
gcc \
git \
make \
libc6-dev \
ca-certificates \
&& \
#
rm -rf /tmp/3proxy && \
apt-get -y clean && \
apt-get -y autoremove --purge
EXPOSE 41337/tcp
CMD ["/usr/local/bin/3proxy", "/etc/3proxy.cfg"]