From 51c40903ab6e0f7621dc862b5dceea281a99638e Mon Sep 17 00:00:00 2001 From: Alexander Bersenev Date: Thu, 21 Jun 2018 10:19:38 +0500 Subject: [PATCH] allows to bind on privilleged ports --- Dockerfile | 3 ++- docker-compose.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 62be9c4..3545fb8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,12 +2,13 @@ FROM alpine:3.6 RUN adduser tgproxy -u 10000 -D -RUN apk add --no-cache python3 py3-crypto ca-certificates +RUN apk add --no-cache python3 py3-crypto ca-certificates libcap COPY mtprotoproxy.py config.py /home/tgproxy/ COPY pyaes/*.py /home/tgproxy/pyaes/ RUN chown -R tgproxy:tgproxy /home/tgproxy +RUN setcap cap_net_bind_service=+ep /usr/bin/python3.6 USER tgproxy diff --git a/docker-compose.yml b/docker-compose.yml index f460e7a..0073e8e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,5 +3,5 @@ services: mtprotoproxy: build: . restart: unless-stopped - mem_limit: 1024m network_mode: "host" +# mem_limit: 1024m