try-vton / Dockerfile
clone3's picture
Create Dockerfile
dc3394d verified
raw
history blame
736 Bytes
FROM alpine:latest
# Install Tor, Python, and dependencies
RUN apk update && \
apk add tor python3 py3-pip curl --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ && \
rm -rf /var/cache/apk/*
# Install Python dependencies
COPY requirements.txt /app/requirements.txt
RUN pip3 install --no-cache-dir -r /app/requirements.txt
# Copy application files
COPY app.py /app/app.py
COPY torrc /etc/tor/torrc
# Set permissions for Tor
RUN chown -R tor /etc/tor
# Create app directory and set permissions
WORKDIR /app
RUN mkdir -p /var/lib/tor && chown -R tor /var/lib/tor
# Expose Flask and SOCKS5 ports
EXPOSE 5000 9050
# Start Tor in background and Flask app
CMD ["sh", "-c", "tor & python3 /app/app.py"]