Skip to content

Commit

Permalink
Remove the named user, change permissions to 'g+w'
Browse files Browse the repository at this point in the history
  • Loading branch information
cimnine committed Nov 18, 2019
1 parent 1c78234 commit 4b6f1e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions Dockerfile
Expand Up @@ -51,10 +51,6 @@ RUN apk add --no-cache \
postgresql-libs \
ttf-ubuntu-font-family

RUN addgroup -S -g 101 netbox \
&& adduser -DHS -u 101 netbox \
&& adduser netbox netbox

WORKDIR /opt

COPY --from=builder /install /usr/local
Expand All @@ -73,10 +69,11 @@ COPY configuration/configuration.py /etc/netbox/config/configuration.py
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
# to g+w so that `./manage.py collectstatic` can be executed during
# container startup.
# Not satisfying
RUN mkdir static && chmod a+w static media
# Must set permissions for '/opt/netbox/netbox/media' directory
# to g+w so that pictures can be uploaded to netbox.
RUN mkdir static && chmod g+w static media

ENTRYPOINT [ "/opt/netbox/docker-entrypoint.sh" ]

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Expand Up @@ -7,7 +7,7 @@ services:
- redis
- netbox-worker
env_file: env/netbox.env
user: netbox
user: '101'
volumes:
- ./startup_scripts:/opt/netbox/startup_scripts:z,ro
- ./initializers:/opt/netbox/initializers:z,ro
Expand Down

0 comments on commit 4b6f1e9

Please sign in to comment.