Adds netbox user
This commit is contained in:
parent
c083baf640
commit
01c4137dc9
10
Dockerfile
10
Dockerfile
@ -51,6 +51,10 @@ RUN apk add --no-cache \
|
|||||||
postgresql-libs \
|
postgresql-libs \
|
||||||
ttf-ubuntu-font-family
|
ttf-ubuntu-font-family
|
||||||
|
|
||||||
|
RUN addgroup -S -g 101 netbox \
|
||||||
|
&& adduser -DHS -u 101 netbox \
|
||||||
|
&& adduser netbox netbox
|
||||||
|
|
||||||
WORKDIR /opt
|
WORKDIR /opt
|
||||||
|
|
||||||
COPY --from=builder /install /usr/local
|
COPY --from=builder /install /usr/local
|
||||||
@ -68,6 +72,12 @@ COPY configuration/configuration.py /etc/netbox/config/configuration.py
|
|||||||
|
|
||||||
WORKDIR /opt/netbox/netbox
|
WORKDIR /opt/netbox/netbox
|
||||||
|
|
||||||
|
# Must set permissions for '/opt/netbox/netbox/static' directory
|
||||||
|
# to a+w so that `./manage.py collectstatic` can be executed during
|
||||||
|
# container startup.
|
||||||
|
# Not satisfying
|
||||||
|
RUN mkdir static && chmod a+w static media
|
||||||
|
|
||||||
ENTRYPOINT [ "/opt/netbox/docker-entrypoint.sh" ]
|
ENTRYPOINT [ "/opt/netbox/docker-entrypoint.sh" ]
|
||||||
|
|
||||||
CMD ["gunicorn", "-c /etc/netbox/config/gunicorn_config.py", "netbox.wsgi"]
|
CMD ["gunicorn", "-c /etc/netbox/config/gunicorn_config.py", "netbox.wsgi"]
|
||||||
|
@ -7,6 +7,7 @@ services:
|
|||||||
- redis
|
- redis
|
||||||
- netbox-worker
|
- netbox-worker
|
||||||
env_file: env/netbox.env
|
env_file: env/netbox.env
|
||||||
|
user: netbox
|
||||||
volumes:
|
volumes:
|
||||||
- ./startup_scripts:/opt/netbox/startup_scripts:z,ro
|
- ./startup_scripts:/opt/netbox/startup_scripts:z,ro
|
||||||
- ./initializers:/opt/netbox/initializers:z,ro
|
- ./initializers:/opt/netbox/initializers:z,ro
|
||||||
|
Loading…
Reference in New Issue
Block a user