How to Update a Docker Container using Portainer

Today we are going to look at how to update a Docker container using Portainer.

There are many different ways to update Docker containers, but Portainer makes the process somewhat straightforward. To demo how to update a Docker container using Portainer, I will be updating an Nginx Proxy Manager container. Currently, I’m running an old version (2.3.1) and we will be updating that to the latest version.

Before starting this process, ensure that your container is created properly and volumes exist with your important data. If the data is not mapped to a local folder, it will be overwritten with the latest image data.

1. Instructions

1. Select Containers, then stop the container that you’d like to update.

portainer update docker container

2. Select the container, and you’ll see a button named Recreate. By selecting this button, the container will take the persistent data and recreate the container. Keep in mind that the only data that will stay on the container is data that was mapped to a volume. This is explained in greater detail in the video above.

portainer update docker container

3. Select Pull latest image, then Recreate.

portainer update docker container

4. When this process is finished, the container will be recreated with the latest image. Select the container and Start it. The status will change to running.

portainer update docker container

5. The container will now exist with the newest released version!

2. Conclusion - Portainer Update Docker Container

As I stated above, this is not the only way of doing this. There are various ways, but this is what I consider to be the easiest. It’s good to periodically check and ensure that your containers are running the latest version. Keep in mind that you can always recreate an existing container using an older version if you run into any unexpected problems. This is what makes Docker containers so easy to work with!

Thanks for reading the tutorial. If you have any questions, feel free to leave them in the comments!

This Post Has 4 Comments

  1. Hello,
    I am just recently getting started with Docker and Portainer on my synology NAS and I find all your tutorials incredibly helpful and very well documented.
    One crucial part that I am sadly lacking is, how do I (correctly) install an image via portainer in the first place, especially where do I do the mapping between the synology folders and the mounted ones in the container?
    It is probably a total beginner question for you, but maybe it is worth it to do a tutorial on it. Maybe I am not the only one with this problem

    1. That’s one of the main reasons I haven’t created a tutorial on Portainer. I love Portainer (use it for all other Docker instances on other OS’s), but I find it a little confusing on Synology’s. In summary, I believe that you have to set the exact volume path of the Docker folder. I am not positive of this (I will try and do some testing at some point), but that’s how I remember it working. I apologize as I know this isn’t the best help! Please let me know if I can answer anything else!

  2. I’m following your youtube channel. Thank you for the great work. I wonder if you can provide us with an app template that works with Portainer on a Raspberry pi (arm based). Also, I wonder if you could show us how we can pull a Docker image from Docker Hub using Portainer, and create a stack on portainer. WordPress and SQL would be great. Kudus!!

    1. Thanks so much! I will add these to my list of tutorials. I will also look into developing an app template one day!

Leave a Reply

Close Menu