Portainer.io – Easily manage Docker containers in Linux

We have already talked about docker in our previous article. If you don’t know about the docker containers, you should learn it. For developers, Docker containers can be really useful. Docker packages are available in almost all distributions’ repositories and can be easily installed. But managing your docker containers can be really daunting especially for people who don’t like working with the command line.

Portainer.io is a great tool to manage Docker containers on cross-platforms. It can be easily installed on any Linux distribution and its web-based GUI front-end is extremely simple to use. We may write detailed articles on portainer’s different features in future articles but in this, we’ll learn to install and set up portainer in Linux.

How to install Portainer in Linux?

Before pulling portainer to our system, install Docker in your system. You can use your distribution’s package manager to install docker in your distro.

  • First of all, update your system.
sudo apt update
sudo apt upgrade
  • Install Docker
sudo apt install docker.io
  • Install portainer
sudo docker volume create portainer_data
sudo docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer

And that is it. Now portainer is installed and running on port 9000. To access the dashboard, visit 127.0.0.1:9000 in your browser.

When you visit 127.0.0.1:9000 for the first time, it will redirect to create a user. Enter the username, strong password and click “Create user”.

Portainer.io set up admin password
Portainer.io set up admin password

The next step is to connect to the Docker environment. You can connect portainer with a remote server, Microsoft Azure server or connect to a portainer agent. In this example, we will connect our local Docker environment with portainer.

Select “Local” and click “Connect”.

Portainer.io connect to docker
Portainer.io connect to docker

You have connected portainer with the local Docker environment. You can now manage docker environment with this easy to use application. Click on the connection “local” and it gets to the dashboard.

Portainer.io homepage
Portainer.io homepage

From the dashboard, you can see and manage the number of stacks, containers, images, volumes, and networks.

Portainer Dashboard
Portainer Dashboard

One of the most useful features of Portainer is that you can easily launch a docker app. There are various app templates available that you can use to launch your application on docker.

To create the app, go to “App Templates” and click on the app you want to launch.

Portainer App templates
Portainer App templates

As you can see below creating an app is very easy. Just select the app, fill in the details, and hit Deploy.

Create docker container
Create docker container

Currently, portainer has 41 app templates available. These templates include CMS, DBMS, web servers, file manager, registry manager and many more.

Conclusion

Docker is a very useful tool for developers and portainer makes it extremely easy to work with. In later articles, I will cover more portainer functionalities in detail. If you have any questions regarding any of the above step, let me know in the comment section below.

The post Portainer.io – Easily manage Docker containers in Linux appeared first on LinuxAndUbuntu.



from LinuxAndUbuntu https://ift.tt/2xwdsGT

Post a Comment

0 Comments