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