From 667e56a4064844a613927498c7601a40034c5def Mon Sep 17 00:00:00 2001 From: Neshura Date: Sun, 27 Nov 2022 16:49:38 +0100 Subject: [PATCH] Dockerfile for 0.1 Dockerfile to use wiht version 0.1 of the repo, might need reworking for later versions --- Dockerfile | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index c220702..14dda66 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,21 @@ -# Generate Python Image -FROM python:3.10.8-slim-buster as builder +# Generate iamge using Python base +FROM python:3.10.8-slim-buster -WORKDIR /app +WORKDIR /usr/bin/app + +# install required tools +RUN apt update && apt install -y curl # Copy only the required files over COPY set_ip.sh cloudflare_script.py config.ini cloudflare.json ./ -RUN ls -a /etc/systemd -#RUN pip install Cloudflare \ No newline at end of file +RUN addgroup --system --gid 1001 pygroup +RUN adduser --system --uid 1001 pyapp + +RUN chown -R pyapp:pygroup /usr/bin/app + +USER pyapp + +RUN pip install Cloudflare + +CMD ["bash", "set_ip.sh"] \ No newline at end of file