forked from htmlgraphic/VPN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
55 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
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM ubuntu:14.04
MAINTAINER Jason Gegere <[email protected]>
# Install packages then remove cache package list information
RUN locale-gen en_US en_US.UTF-8 \
&& apt-get update \
&& apt-get -yq install build-essential \
libssl-dev \
libreadline-dev \
libncurses5-dev \
gcc \
make \
wget \
openssh-client \
redsocks \
iptables \
vim \
lynx \
iptables-persistent \
git
COPY build.sh /build.sh
COPY run.c /usr/local/src/
RUN bash /build.sh \
&& rm /build.sh
COPY app /app
RUN chmod 755 -R /app
RUN apt-get -y remove build-essential \
&& apt-get clean \
&& apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENV PROXY_HOST=$PROXY_HOST \
PROXY_PORT=$PROXY_PORT \
LOCAL_IP=$LOCAL_IP \
no_proxy=$NO_PROXY
WORKDIR /opt
ENTRYPOINT ["/entrypoint.sh"]
# Note that EXPOSE only works for inter-container links. It doesn't make ports accessible from the host. To expose port(s) to the host, at runtime, use the -p flag.
EXPOSE 500/udp 4500/udp 1701/tcp
CMD ["/usr/local/sbin/run"]