Skip to content

Commit

Permalink
Merge pull request #1380 from tobiasge/edition-marker
Browse files Browse the repository at this point in the history
Display Docker image version
  • Loading branch information
tobiasge authored Jan 20, 2025
2 parents e48a1b6 + 0ec4c5d commit 64bf745
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ docker-compose*
env
test-configuration
.netbox/.git*
.netbox/.pre-commit-config.yaml
.netbox/.readthedocs.yaml
.netbox/.tx
.netbox/contrib
.netbox/scripts
.netbox/upgrade.sh
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ COPY docker/housekeeping.sh /opt/netbox/housekeeping.sh
COPY docker/launch-netbox.sh /opt/netbox/launch-netbox.sh
COPY configuration/ /etc/netbox/config/
COPY docker/nginx-unit.json /etc/unit/
COPY VERSION /opt/netbox/VERSION

WORKDIR /opt/netbox/netbox

Expand All @@ -99,7 +100,9 @@ RUN mkdir -p static /opt/unit/state/ /opt/unit/tmp/ \
&& chmod -R g+w /opt/unit/ media reports scripts \
&& cd /opt/netbox/ && SECRET_KEY="dummyKeyWithMinimumLength-------------------------" /opt/netbox/venv/bin/python -m mkdocs build \
--config-file /opt/netbox/mkdocs.yml --site-dir /opt/netbox/netbox/project-static/docs/ \
&& SECRET_KEY="dummyKeyWithMinimumLength-------------------------" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input
&& SECRET_KEY="dummyKeyWithMinimumLength-------------------------" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input \
&& mkdir /opt/netbox/netbox/local \
&& echo "edition: Community (Docker image $(cat /opt/netbox/VERSION))" > /opt/netbox/netbox/local/release.yaml

ENV LANG=C.utf8 PATH=/opt/netbox/venv/bin:$PATH
ENTRYPOINT [ "/usr/bin/tini", "--" ]
Expand Down

0 comments on commit 64bf745

Please sign in to comment.