How to install netbox-bgp plugin inside an active and production docker image? #844
Replies: 2 comments 1 reply
-
Hello, By following the link to the documentation, here is a step-by-step guide : git clone -b release https://github.com/netbox-community/netbox-docker.git netbox
cd netbox
touch plugin_requirements.txt Dockerfile-Plugins docker-compose.override.yml
echo "netbox-bgp" > plugin_requirements.txt #Install BGP Plugin Pypi Package Create the Dockerfile used to build the custom Image cat << EOF > Dockerfile-Plugins
FROM netboxcommunity/netbox:latest
COPY ./plugin_requirements.txt /opt/netbox/
RUN /opt/netbox/venv/bin/pip install --no-warn-script-location -r /opt/netbox/plugin_requirements.txt
COPY configuration/configuration.py /etc/netbox/config/configuration.py
COPY configuration/plugins.py /etc/netbox/config/plugins.py
RUN SECRET_KEY="dummydummydummydummydummydummydummydummydummydummy" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input
EOF Tip This Create the cat <<EOF > docker-compose.override.yml
services:
netbox:
image: netbox:latest
pull_policy: never
ports:
- 8000:8080
build:
context: .
dockerfile: Dockerfile-Plugins
netbox-worker:
image: netbox:latest
pull_policy: never
netbox-housekeeping:
image: netbox:latest
pull_policy: never
EOF Enable the plugin by adding configuration in PLUGINS = ["netbox_bgp"]
# PLUGINS_CONFIG = {
# "netbox_bgp": {
# ADD YOUR SETTINGS HERE
# }
# } Build and Deploy docker compose build --no-cache
docker compose up -d Create the first admin user : docker compose exec netbox /opt/netbox/netbox/manage.py createsuperuser |
Beta Was this translation helpful? Give feedback.
-
Hi, Sorry for waking this thread up again, but I found it unnecessary to start a new one. I'm trying to build a custom image with the plugin "netboxlabs-diode-netbox-plugin", but everytime I try to include the row below, it tries to connect to the postgres database, but the env-variables are not loaded, hence DB_HOST for example is blank. Is there any solution to this, or should I just exclude this command? The reason to why I am including it is because its specified in the installation instructions for netboxlabs-diode-netbox-plugin, however that is not for docker but for a server installation.
Exluding the command will build properly, but I don't know the consequence. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I have finally upgraded our Netbox to 3.3. This time I installed it via the docker community image. Previously it used to be a custom install of 2.9. The new install is now populated with data.
Now, I must apologise but my docker knowledge is small to nonexistent. And my Linux knowledge is rusty. So have patience with me.
How do I install the Netbox BGP plugin inside a docker image? This one:
https://github.com/k01ek/netbox-bgp
Inside an active image, without deleting the data inside the docker image?
I have installed Netbox following this tutorial:
https://computingforgeeks.com/how-to-run-netbox-ipam-tool-in-docker-containers/
I have seen this:
https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins
But that is going over my head right now. Is there a simpler, stupider(although maybe worse) way to do this?
Beta Was this translation helpful? Give feedback.
All reactions