Portainer – Installing / Upgrading

Portainer to Docker is what peanut butter is to bread – an amazing combination! Docker, with its innovative container technology, revolutionizes how we build, ship, and run applications, offering a level of flexibility previously unheard of. However, mastering Docker can be akin to learning the art of making the perfect peanut butter sandwich from scratch, including roasting and grinding the peanuts yourself. Not everyone has the time or desire to delve into the minutiae of command-line instructions and Dockerfile syntax.

This is where Portainer comes in, spreading smoothly over Docker like peanut butter on bread, creating a deliciously efficient and user-friendly experience. Portainer provides a graphical web interface that simplifies the Docker experience, removing much of the guesswork involved in deploying and managing containers. Whether you’re dealing with a single local host or orchestrating a symphony of servers, Portainer makes it as easy as spreading peanut butter on bread.

With Portainer, you no longer need to memorize complex commands or navigate through endless terminal windows. It’s like having a recipe book at your fingertips that guides you through the process, ensuring you get to enjoy your peanut butter sandwich without the hassle. This tool is invaluable for developers and IT professionals seeking to leverage Docker’s power without getting bogged down by its complexity.

I could go in to much more detail about how to use this software and in the future I might just do that, but I want to provide you with the most useful couple of commands you’ll need when working with Portainer and any of our future projects.

Fresh Installation (after you’ve installed Docker):

sudo docker run -d -p 8000:8000 -p 9443:9443 --name portainer \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer-ce:latest

Upgrading with sudo:

#Let's start with removing the old container.
sudo docker stop portainer
sudo docker rm portainer
#Updating the portainer image
sudo docker image pull portainer/portainer-ce:latest

#Time to reinstall
sudo docker run -d -p 8000:8000 -p 9443:9443 --name portainer \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer-ce:latest

Upgrading without sudo:

#Let's start with removing the old container.
docker stop portainer
docker rm portainer
#Updating the portainer image
docker image pull portainer/portainer-ce:latest

#Time to reinstall
docker run -d -p 8000:8000 -p 9443:9443 --name portainer \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer-ce:latest

Benjamin J.

As a technology enthusiast with over 30 years of experience in the field, I have developed a deep passion for computer security. My interest in this field began at a young age when I was first introduced to computers through an ancient MS-DOS system, and the very first command I discovered, 'dir', sparked my curiosity and desire to learn more. Throughout my professional career, I have dedicated myself to gaining a comprehensive understanding of hacking and its various techniques, with a particular focus on sharing this knowledge with others. I believe that equipping others with the tools and understanding they need to protect themselves is crucial in today's digital landscape.

Post navigation