SAMPLE
Browse files- Dockerfile +9 -3
Dockerfile
CHANGED
@@ -1,18 +1,24 @@
|
|
1 |
# Use an official Python image as a base
|
2 |
FROM python:3.10-slim
|
3 |
-
RUN apt update && apt install -y openvpn
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
# Set the working directory in the container
|
7 |
WORKDIR /app
|
8 |
|
9 |
# Copy the application files to the container
|
10 |
-
COPY
|
|
|
11 |
# Install dependencies
|
12 |
RUN pip install --no-cache-dir --upgrade pip && \
|
13 |
pip install --no-cache-dir -r requirements.txt
|
14 |
|
15 |
-
|
16 |
COPY . /app
|
17 |
|
18 |
# Expose the port the app runs on
|
|
|
1 |
# Use an official Python image as a base
|
2 |
FROM python:3.10-slim
|
|
|
3 |
|
4 |
+
# Install OpenVPN and dependencies
|
5 |
+
RUN apt update && apt install -y openvpn && \
|
6 |
+
# Ensure the TUN device is available
|
7 |
+
mkdir -p /dev/net && \
|
8 |
+
mknod /dev/net/tun c 10 200 && \
|
9 |
+
chmod 0666 /dev/net/tun
|
10 |
|
11 |
# Set the working directory in the container
|
12 |
WORKDIR /app
|
13 |
|
14 |
# Copy the application files to the container
|
15 |
+
COPY requirements.txt /app/requirements.txt
|
16 |
+
|
17 |
# Install dependencies
|
18 |
RUN pip install --no-cache-dir --upgrade pip && \
|
19 |
pip install --no-cache-dir -r requirements.txt
|
20 |
|
21 |
+
# Copy the rest of the application files
|
22 |
COPY . /app
|
23 |
|
24 |
# Expose the port the app runs on
|