FROM ubuntu:22.04 | |
# Install required packages | |
RUN apt-get update && apt-get install -y \ | |
openvpn \ | |
iptables \ | |
python3 \ | |
python3-pip \ | |
curl \ | |
wget \ | |
net-tools \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Install Python dependencies | |
RUN pip3 install gradio requests | |
# Create necessary directories | |
RUN mkdir -p /etc/openvpn/server | |
RUN mkdir -p /app | |
# Copy application files | |
COPY app.py /app/ | |
COPY setup_vpn.sh /app/ | |
COPY server.conf /etc/openvpn/server/ | |
# Make scripts executable | |
RUN chmod +x /app/setup_vpn.sh | |
# Create OpenVPN keys directory | |
RUN mkdir -p /etc/openvpn/easy-rsa | |
RUN mkdir -p /etc/openvpn/server/keys | |
# Set working directory | |
WORKDIR /app | |
# Expose port 7860 (Hugging Face default) | |
EXPOSE 7860 | |
# Start the application | |
CMD ["python3", "app.py"] |