Refactor Dockerfile with less layer and improved layer cache (#220)

This commit is contained in:
Peter Dave Hello
2020-04-27 20:22:57 +08:00
committed by GitHub
parent 18a80e52cd
commit 6ecf0ec9ac

View File

@@ -5,12 +5,12 @@ RUN setcap cap_net_bind_service=+ep /usr/local/bin/python3.8
RUN pip3 --no-cache-dir install cryptography uvloop RUN pip3 --no-cache-dir install cryptography uvloop
COPY mtprotoproxy.py config.py /home/tgproxy/
RUN useradd tgproxy -u 10000 RUN useradd tgproxy -u 10000
RUN chown -R tgproxy:tgproxy /home/tgproxy
USER tgproxy USER tgproxy
WORKDIR /home/tgproxy/ WORKDIR /home/tgproxy/
COPY --chown=tgproxy mtprotoproxy.py config.py /home/tgproxy/
CMD ["python3", "mtprotoproxy.py"] CMD ["python3", "mtprotoproxy.py"]