Question on extending the image #749
-
Hi,
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Ok, finally got this working so I'll document here. First, I was trying to use apt-get (Ubuntu) to install packages but the Netbox image is based off of Alpine Linux so I needed to use "apk add" to add packages. Next, I needed to do bit of research and trial and error to get the equivalent package names for Alpine Linux. Lastly, I needed to run pip using the Netbox venv within the container and not in system installed python. This fooled me at first because when I logged into the Netbox container and issued the "pip list" command, I saw the napalm package so I assumed this is what netbox was using... Wrong. Netbox python environment in the container is /opt/netbox/venv/bin.
The command to build new image (don't forget trailing dot):
After the new image is built, you need to modify the docker-compose.yml file to reflect the new image. Lastly, stop and then restart Netbox using "docker-compose stop" and then "docker-compose up -d" |
Beta Was this translation helpful? Give feedback.
Ok, finally got this working so I'll document here. First, I was trying to use apt-get (Ubuntu) to install packages but the Netbox image is based off of Alpine Linux so I needed to use "apk add" to add packages. Next, I needed to do bit of research and trial and error to get the equivalent package names for Alpine Linux. Lastly, I needed to run pip using the Netbox venv within the container and not in system installed python. This fooled me at first because when I logged into the Netbox container and issued the "pip list" command, I saw the napalm package so I assumed this is what netbox was using... Wrong. Netbox python environment in the container is /opt/netbox/venv/bin.
Then I was abl…