From 639dea5e8d89fd29e8dbdc3ed4d651d7c53ae5fc Mon Sep 17 00:00:00 2001 From: Alexander Bersenev Date: Thu, 13 Feb 2020 04:13:49 +0500 Subject: [PATCH] use debian image by default --- Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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