diff --git a/Dockerfile b/Dockerfile index 0697841..162956c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,14 @@ -FROM alpine:3.11 +FROM python:3.8-slim-buster -RUN adduser tgproxy -u 10000 -D +RUN apt-get update && apt-get install -y libcap2-bin \ + && setcap cap_net_bind_service=+ep /usr/local/bin/python3.8 \ + && apt-get purge -y libcap2-bin && apt-get autoremove -y && rm -rf /var/lib/apt/lists/* -RUN apk add --no-cache python3 py3-cryptography ca-certificates libcap - -RUN setcap cap_net_bind_service=+ep /usr/bin/python3.8 +RUN pip3 --no-cache-dir install cryptography uvloop COPY mtprotoproxy.py config.py /home/tgproxy/ + +RUN useradd tgproxy -u 10000 RUN chown -R tgproxy:tgproxy /home/tgproxy USER tgproxy