How to deploy the Portainer container management tool with persistent storage

In search of a strong web-based Docker container supervisor? Jack Wallen reveals you methods to deploy among the best in the marketplace.

Containers concept

Picture: Avigator Fortuner/Shutterstock

Since I final coated Portainer, issues have modified a bit. That is simply how issues evolve in know-how. One minute one thing works, and the following you must take additional steps to do the identical factor. That is very true inside the realm of containers.

And given I have never touched on Portainer since 2017, it must be apparent that issues have dramatically modified and improved. That is why I need to not solely revisit the topic but in addition exhibit a extra dependable technique of deploying Portainer. This time round we’ll be working the container with persistent storage, so ought to one thing go awry, you continue to have your information.

SEE: 40+ open supply and Linux phrases it’s essential to know (TechRepublic Premium)

What are you able to do with Portainer?

For many who aren’t acquainted with Portainer, it is a web-based GUI that lets you take full management over your container deployments. With this software, you’ll be able to pull photographs, add containers, add networks and endpoints, create registries and rather more. In actual fact, should you’re on the lookout for a web-based Docker container administration platform, this must be your go-to.

And, with out additional ado, let’s get to the deployment.

What you will want

I will be demonstrating on an occasion of Ubuntu Server 20.04. You possibly can deploy Portainer on any platform that helps Docker, so the one factor you might need to alter in my directions beneath is the set up of Docker in your working system of selection. 

You will additionally want a consumer with sudo privileges.

Prepared?

How one can set up Docker

The very first thing we’ll do is set up Docker (in case you do not have already got it put in). I need to set up the neighborhood version of the Docker engine, so log into your server and deal with the next.

First, set up the dependencies with:

sudo apt-get set up ca-certificates curl gnupg lsb-release -y

Subsequent add the official Docker GPG key:

curl -fsSL https://obtain.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Now, we are able to add the Docker repository with the command:

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://obtain.docker.com/linux/ubuntu $(lsb_release -cs) secure" | sudo tee /and so on/apt/sources.checklist.d/docker.checklist > /dev/null

Replace apt and set up Docker Engine with:

sudo apt-get replace
sudo apt-get set up docker-ce docker-ce-cli containerd.io

After the set up completes, add your consumer to the docker group with:

sudo usermod -aG docker $USER

Log off and log again in.

How one can deploy Portainer

And now, we are able to deploy Portainer. The very first thing we do is create a listing to accommodate the info. Create that listing with the next instructions:

docker quantity create portainer_data

With the quantity prepared, deploy Portainer with:

docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=all the time -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/information portainer/portainer

Give the container time sufficient to drag and deploy. As soon as it has, level a browser to http://SERVER:9000 (The place SERVER is the IP tackle of the host). You may be greeted by a window requiring you to create a password for the admin consumer. When you try this, you will see the Portainer setup window (Determine A).

Determine A

portainera.jpg

The Portainer setup window is prepared so that you can hook up with the Docker Engine.

Since we have put in the Docker Engine on the identical host we have deployed Portainer, click on the Native tab after which click on Join (Determine B).

Determine B

portainerb.jpg

Luckily, we have began the Portainer container with the right sock choices.

Congratulations, you now have Portainer up and working, with persistent information, and are prepared to start out managing your container deployments. Take pleasure in that web-based, consumer pleasant energy.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the most recent tech recommendation for enterprise professionals from Jack Wallen.  

Additionally see

Recent Articles

spot_img

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here

Stay on op - Ge the daily news in your inbox