navpan2 commited on
Commit
fcc9de2
·
verified ·
1 Parent(s): 1ba3b50

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +40 -0
Dockerfile ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:22.04
2
+
3
+ # Install required packages
4
+ RUN apt-get update && apt-get install -y \
5
+ openvpn \
6
+ iptables \
7
+ python3 \
8
+ python3-pip \
9
+ curl \
10
+ wget \
11
+ net-tools \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Install Python dependencies
15
+ RUN pip3 install gradio requests
16
+
17
+ # Create necessary directories
18
+ RUN mkdir -p /etc/openvpn/server
19
+ RUN mkdir -p /app
20
+
21
+ # Copy application files
22
+ COPY app.py /app/
23
+ COPY setup_vpn.sh /app/
24
+ COPY server.conf /etc/openvpn/server/
25
+
26
+ # Make scripts executable
27
+ RUN chmod +x /app/setup_vpn.sh
28
+
29
+ # Create OpenVPN keys directory
30
+ RUN mkdir -p /etc/openvpn/easy-rsa
31
+ RUN mkdir -p /etc/openvpn/server/keys
32
+
33
+ # Set working directory
34
+ WORKDIR /app
35
+
36
+ # Expose port 7860 (Hugging Face default)
37
+ EXPOSE 7860
38
+
39
+ # Start the application
40
+ CMD ["python3", "app.py"]