FROM python:3.7-slim RUN useradd -u 1000 -ms /bin/bash python && \ apt update && \ apt install -y git WORKDIR /home/python USER python RUN python -m venv /home/python/venv # "Activate" the venv ENV PATH="/home/python/venv/bin:$PATH" COPY min_req.txt req.txt RUN pip install -r req.txt # CMD ["python", "tcp-proxy.py"]