From c8f3acad56cd8eaae21843434aa3af7fc31a7e65 Mon Sep 17 00:00:00 2001 From: "ricardo.bartels@telekom.de" Date: Sun, 23 Jan 2022 22:34:51 +0100 Subject: [PATCH] adds User to docker container #118 --- Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Dockerfile b/Dockerfile index 4b4f572..96e6646 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,4 +12,13 @@ RUN cd /opt && \ # Run the application WORKDIR /opt + +RUN set -eux; \ + addgroup --gid 1000 netbox-sync; \ + adduser --uid 1000 --ingroup netbox-sync --shell /bin/sh --home /home/netbox-sync --disabled-password netbox-sync + +RUN chown -R netbox-sync:netbox-sync /opt + +USER netbox-sync + ENTRYPOINT ["python3", "netbox-sync.py"]