From 6c2eb6585d1bbc37ed0e6ec46362a82937f4f7dc Mon Sep 17 00:00:00 2001 From: Alfonso De Cala Bravo Date: Thu, 7 Jul 2022 14:39:35 +0200 Subject: [PATCH] Some fixes to make containers running as non-root users --- Dockerfile | 9 +++++---- requirements.txt | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 143c819..51a02f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,13 @@ -FROM python:3 AS compile-image +FROM python:3.10.5 AS compile-image -RUN pip install --no-cache-dir --user telethon cryptg==0.2 +RUN pip install --no-cache-dir telethon cryptg==0.2 -FROM python:3-slim AS run-image +FROM python:3.10.5-slim AS run-image -COPY --from=compile-image /root/.local /root/.local +COPY --from=compile-image /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages WORKDIR /app COPY *.py ./ +RUN chmod 777 /app/*.py CMD [ "python3", "./telegram-download-daemon.py" ] diff --git a/requirements.txt b/requirements.txt index 7538e74..f6a697b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ cffi==1.14.0 -cryptg==0.2.post0 +cryptg==0.3 pyaes==1.6.1 pyasn1==0.4.8 pycparser==2.20