feat(netbox): add Dockerfile for NetBox with plugins
This commit is contained in:
26
images/netbox/Dockerfile
Normal file
26
images/netbox/Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
# =============================================================================
|
||||
# NetBox Docker Image with Plugins
|
||||
#
|
||||
# Image NetBox personnalisée avec plugins pré-installés
|
||||
# Basée sur l'image officielle netboxcommunity/netbox
|
||||
# =============================================================================
|
||||
|
||||
ARG NETBOX_VERSION=latest
|
||||
FROM netboxcommunity/netbox:${NETBOX_VERSION}
|
||||
|
||||
LABEL maintainer="Damien Arnodo"
|
||||
LABEL description="NetBox with pre-installed plugins for homelab use"
|
||||
|
||||
# Copie du fichier de requirements des plugins
|
||||
COPY plugin_requirements.txt /opt/netbox/
|
||||
|
||||
# Installation des plugins via uv pip (méthode officielle NetBox Docker)
|
||||
RUN /usr/local/bin/uv pip install --no-cache -r /opt/netbox/plugin_requirements.txt
|
||||
|
||||
# Copie de la configuration des plugins
|
||||
COPY plugins.py /etc/netbox/config/plugins.py
|
||||
|
||||
# Collecte des assets statiques des plugins
|
||||
# Nécessite une SECRET_KEY dummy pour le build
|
||||
RUN SECRET_KEY="build-time-dummy-key-not-used-in-production" \
|
||||
/opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input
|
||||
Reference in New Issue
Block a user