How to Update Pi-hole from Portainer
Table of Contents
Now that you have Pi-hole and Portainer setup within Docker (perhaps on a Raspberry Pi ?) and you notice that an update is available for Pi-hole, you may be wondering, “How do I update Pi-hole”? Sure, you can pull a new image and restart it via the command line. However, you have a nice graphical interface setup and you may enjoy looking at it rather than a console window (sacrilege for the command line folks, I know).
I must note that Pi-hole does not seem to have any tags for the latest version for ARM CPUs such as the Raspberry Pi (where I have my Pi-hole installed). Therefore, you cannot simply pull the latest image from the current tag since it does not point to the latest version. So you have to switch to a new image tag whenever new releases are posted. The process is similar to updating an existing image to the latest version with the “latest” tag but you just have to make sure that the tag gets updated each time to reflect the new version number.
Duplicate and Change Image Name
Click on “Containers” then “Pihole” or whatever you named your container for Pi-hole. Then click “Duplicate/Edit”:
All you need to change is the image name to the latest version. In this example, I changed it to “pihole/pihole:4.2.2_armhf” which is the latest version of Pi-hole at the time of this writing. Notice I am using the ARM version of Pi-hole since I am running Pi-hole on a Raspberry Pi 3 Model B+.
To find the list of image names for Pi-hole, it is on their official Docker Hub page.
Click the “Deploy the container” button near the middle of the page (might be at the bottom of your screen before scrolling down further). You will be prompted if you wish to replace the existing container. Click “Yes” to update the existing container. You could rename your container in case you want a backup copy but you could simply revert by reloading an older version. It should be pretty straightforward if you seem to run into trouble. If you wanted to make a second copy, it might be a good idea to shut down the first image before proceeding.
You may click on the “Containers” menu item again if you want to see the list of your deployed containers to ensure that Pi-hole started successfully. So that’s it! You just need to edit the existing image, change to the latest version tag, and redeploy!