-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile-test
40 lines (30 loc) · 1.41 KB
/
Dockerfile-test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Use a base Python image
FROM python:3.13-slim
# Set the working directory in the container
WORKDIR /app
# -----------------------------------------------------------------------------
# Install system dependencies for Tor - Use only if you know what you are doing!
# RUN apt-get update && \
# apt-get install -y tor && \
# rm -rf /var/lib/apt/lists/*
# Configure Tor to allow control with cookie authentication
# RUN echo "ControlPort 9051\nCookieAuthentication 1" >> /etc/tor/torrc
# -----------------------------------------------------------------------------
# Copy the requirements.txt file into the container
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org
# Copy the rest of your project files into the container
COPY . .
# Expose port 5000 for Flask
EXPOSE 5000
# -----------------------------------------------------------------------------
# Tor control port
# EXPOSE 9051
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# Start Tor in the background and then the Flask application - Disabled by default
# CMD tor & python app.py
# -----------------------------------------------------------------------------
# Start the Flask application
CMD python app.py