Use Portainer to manage Docker apps

Tram Ho

I. Introduction

Why use portainer to manage docker apps?

  • There are quite a few of you when using docker having problems with the statement that has it, every time you check the list of containers or images, even deleting it, a lot of commands are correct.
  • Another problem is that when your system needs to use too many services and containers, command line management becomes difficult and difficult to see. That’s why portainer solves the problem of managing docker apps and manipulating them more conveniently in the UI interface.

II. Setting

Deploy Portainer on Linux:

Deploy Portainer on Windows:

Init Docker Swarm on Linux:

Portainer manages docker apps with swarm docker, so you need to init dock swarm with your device’s ip (or server) to deploy the stack.

Deploy docker stack on Linux:

Deploy docker stack on Windows:

III. Use

After installing docker container for portainer, they go into the browser and type the url: http://192.168.1.34:9000

Above is my computer’s ip, go to network settings to get the ip and init with the swarm docker as above. If successful, it will display the login screen as below. You enter your password and then click create user.

After logging in successfully, we will go to the dashboard of portainer as below.

In the dashboard page portainer gave us a default endpoint is primary you can to rename or create new arbitrary endpoint.

After the update is complete, you click to update endpoint. In the endpoint include management for stacks, services, containers, images, networks, etc. You can add the stack directly in the management page. By adding the docker-compose file

Or you can also run by command then view and manage on the dashboard. That is also the reason for creating portainer dashboard

And here are the stacks after we have run docker-compose.yml with command or deploy on the dashboard

As you can see after running docker-compose, my current stacks include containers as below

Now you can start, stop, or even remove containers without having to type the command line.

Services management screen:

Container management screen: We can handle all container tasks

Instead of before we have to see on the command line:

Images management screen: We can manipulate all tasks of images

Instead of before we have to see on the command line:

…. Now you can completely control the whole docker system for your project here.

IV. Conclusion

For small projects that do not use too many services or containers docker, you do not need to install portainer to manage, you still can use the command line to manage for professional. Hopefully through the article you already know about a tool to manage docker apps. Looking forward to your suggestions and discussions a lot.

Share the news now

Source : Viblo