-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
37 lines (29 loc) · 1.06 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
FROM debian:jessie
MAINTAINER Ilya Makarov <im@e11it.ru>
LABEL version="0.8.11"
ENV PROXY_VER=0.8.11
RUN apt-get -q update &&\
DEBIAN_FRONTEND=noninteractive &&\
apt-get -qy --force-yes dist-upgrade &&\
# Install req software
apt-get install -qy --force-yes build-essential libevent-dev libssl-dev wget &&\
# Install 3proxy
wget https://github.com/z3APA3A/3proxy/archive/3proxy-${PROXY_VER}.tar.gz &&\
tar xzfv 3proxy-${PROXY_VER}.tar.gz -C /tmp &&\
# Enable anonymous mode
echo '#define ANONYMOUS 1' >> /tmp/3proxy-3proxy-${PROXY_VER}/src/3proxy.h &&\
make -C /tmp/3proxy-3proxy-${PROXY_VER} -f Makefile.Linux &&\
make -C /tmp/3proxy-3proxy-${PROXY_VER} -f Makefile.Linux install &&\
rm 3proxy-${PROXY_VER}.tar.gz &&\
# For log to stdout
ln -sf /dev/stdout /var/log/3proxy.log &&\
# Clean
apt-get purge -y --auto-remove build-essential wget &&\
apt-get clean &&\
rm -rf /var/lib/apt/lists/* /tmp/*
# Add config file
ADD 3proxy.cfg /etc/3proxy/3proxy.cfg
# Ports
EXPOSE 8080 3128
STOPSIGNAL SIGTERM
CMD [ "/usr/local/bin/3proxy", "/etc/3proxy/3proxy.cfg" ]