How to upgrade Netbox in docker container

1,290 views
Skip to first unread message

Shay Ben David

unread,
Jan 5, 2020, 4:41:56 AM1/5/20
to NetBox
Hi,
I'm running netbox 2.6.9 in a docker container.
How can i perform an upgrade?

Brian Candler

unread,
Jan 5, 2020, 6:05:21 AM1/5/20
to NetBox
That depends how you built and deployed the docker container.  There is no "official" docker image for Netbox any more, so you presumably you either got one from some third party location, or you wrote a Dockerfile yourself.  If you want specific advice, it would be best to go to the location where you got your docker image or Dockerfile from.

In general though: you never upgrade an application *within* a docker container.  You simply deploy a new docker container with the new version of the application.

Are you using a separate postgres database? Did you mount the media and reports directories as docker volumes?  If so, you just blow away the Netbox docker container and start a fresh one with the same docker volumes attached and talking to the same postgres database instance.

If the docker container includes it own postgres database, then you'll need to carry it through to the new container.  If its state is in a docker volume, that's simple.  if not, then you'll either need to extract the state into a docker volume before creating the new container, or do a pgdump of the database, which you restore into the new container.
Reply all
Reply to author
Forward
0 new messages