likhonsheikh commited on
Commit
17388ed
·
verified ·
1 Parent(s): 04f22f2

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -0
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Base image from OpenVPN-AS
2
+ FROM openvpn/openvpn-as:latest
3
+
4
+ # Expose required ports (note: Hugging Face only allows HTTP/HTTPS)
5
+ EXPOSE 943 443 1194/udp
6
+
7
+ # Optional: create directory for data
8
+ VOLUME ["/openvpn"]
9
+
10
+ # Hugging Face Spaces use a non-root user by default — need root for tun
11
+ USER root
12
+
13
+ # Enable TUN interface setup (will fail silently if not supported)
14
+ RUN mkdir -p /dev/net && \
15
+ (mknod /dev/net/tun c 10 200 || true) && \
16
+ chmod 600 /dev/net/tun || true
17
+
18
+ # Default command to run OpenVPN Access Server
19
+ CMD ["/usr/local/openvpn_as/scripts/openvpnas", "run"]