Skip to content

Commit c8f3aca

Browse files
committed
adds User to docker container #118
1 parent 35fe382 commit c8f3aca

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,13 @@ RUN cd /opt && \
1212

1313
# Run the application
1414
WORKDIR /opt
15+
16+
RUN set -eux; \
17+
addgroup --gid 1000 netbox-sync; \
18+
adduser --uid 1000 --ingroup netbox-sync --shell /bin/sh --home /home/netbox-sync --disabled-password netbox-sync
19+
20+
RUN chown -R netbox-sync:netbox-sync /opt
21+
22+
USER netbox-sync
23+
1524
ENTRYPOINT ["python3", "netbox-sync.py"]

0 commit comments

Comments
 (0)