File size: 519 Bytes
ca624a2 c002d4e ca624a2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
FROM python:3.11-slim
# Install Tor and curl
RUN apt-get update && apt-get install -y tor curl && rm -rf /var/lib/apt/lists/*
# Create a writable Tor data directory
RUN mkdir -p /tmp/tor
# Copy tor configuration
COPY torrc /etc/tor/torrc
# Set workdir
WORKDIR /app
# Copy Python requirements and install
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy main script
COPY app.py /app/app.py
# Start Tor in background and then run app.py
CMD tor & python app.py
|