* Extend comment about port mapping since everyone seems to want to run on port 443/tcp. * Accept that nobody (except the already competent) will read the comment and ask anyway.
		
			
				
	
	
		
			32 lines
		
	
	
		
			907 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			907 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
# Original credit: https://github.com/jpetazzo/dockvpn
 | 
						|
 | 
						|
# Leaner build then Ubunutu
 | 
						|
FROM debian:jessie
 | 
						|
 | 
						|
MAINTAINER Kyle Manna <kyle@kylemanna.com>
 | 
						|
 | 
						|
RUN apt-get update && \
 | 
						|
    apt-get install -y openvpn iptables git-core && \
 | 
						|
    apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
 | 
						|
 | 
						|
# Update checkout to use tags when v3.0 is finally released
 | 
						|
RUN git clone --depth 1 --branch v3.0.0-rc2 https://github.com/OpenVPN/easy-rsa.git /usr/local/share/easy-rsa && \
 | 
						|
    ln -s /usr/local/share/easy-rsa/easyrsa3/easyrsa /usr/local/bin
 | 
						|
 | 
						|
# Needed by scripts
 | 
						|
ENV OPENVPN /etc/openvpn
 | 
						|
ENV EASYRSA /usr/local/share/easy-rsa/easyrsa3
 | 
						|
ENV EASYRSA_PKI $OPENVPN/pki
 | 
						|
ENV EASYRSA_VARS_FILE $OPENVPN/vars
 | 
						|
 | 
						|
VOLUME ["/etc/openvpn"]
 | 
						|
 | 
						|
# Internally uses port 1194/udp, remap using `docker run -p 443:1194/tcp`
 | 
						|
EXPOSE 1194/udp
 | 
						|
 | 
						|
WORKDIR /etc/openvpn
 | 
						|
CMD ["ovpn_run"]
 | 
						|
 | 
						|
ADD ./bin /usr/local/bin
 | 
						|
RUN chmod a+x /usr/local/bin/*
 |