-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
49 lines (35 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
38
39
40
41
42
43
44
45
46
47
48
49
####################
# Compilation image stage
############################
FROM alpine:latest as build
# Install base packages
RUN apk update && apk add git build-base linux-headers bind-tools
# Download 3proxy 0.8.8
RUN mkdir -p /usr/src
WORKDIR /usr/src
RUN git clone https://github.com/z3APA3A/3proxy.git
WORKDIR /usr/src/3proxy
RUN git checkout tags/0.8.11
# Compile and install 3proxy
RUN make -f Makefile.Linux && \
make -f Makefile.Linux install
#######################
# Execution image stage
#########################
FROM alpine:latest
# Define default ENV values
ENV SERVER=127.0.0.1
ENV USER=user
ENV PASSWORD=password
ENV PORT=3128
ENV DNS1=1.1.1.1
ENV DNS2=8.8.8.8
# Install and setup 3proxy files
COPY --from=build /usr/local/bin/3proxy /usr/local/bin/3proxy
RUN mkdir -p /usr/local/etc/3proxy/logs && apk update && apk add bind-tools
WORKDIR /usr/local/etc/3proxy/
ADD 3proxy.cfg.dist /usr/local/etc/3proxy/
ADD docker-entrypoint.sh /usr/local/etc/3proxy/
EXPOSE $PORT
ENTRYPOINT ["/usr/local/etc/3proxy/docker-entrypoint.sh"]
CMD ["start_proxy"]