How to manage docker through UI

How to manage docker through UI

Docker is being used in more and more scenarios. For those who are not used to command line tools, docker cli may be difficult to use. In this article, the author will introduce a powerful Docker web client: portainer (shore crane, refer to the illustration below). According to portainer's official statement, it allows us to easily manage docker hosts and docker swarm clusters through the UI. Note: The demonstration environment of this article is Ubuntu 16.04.

Install portainer

Just like we run applications through containers, we just need to run a container. It is very simple:

$ docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer

Then access the protainer site through port 9000 in your browser!

Configuring Administrator Information

When you access portainer for the first time, you need to set the administrator account information. We name the administrator account admin and set the password:

Select the object managed by portainer

For simplicity, we first configure portainer to manage the local docker, select "Local" in the figure below and click the "connect" button:

Understand the main functions of portainer

After a simple installation and configuration, we entered the portainer dashboard interface:

Portainer's interface design is very simple, and the main menu corresponds almost one-to-one to the main functions of Docker. Next, we will create a container through the App Templates menu and use this container to introduce some commonly used functions in portainer.

Select the App Templates menu on the left, and then choose to create an application running in an nginx container:

In the configuration interface of the container properties, specify the name of the container as webdemo, and then set the advanced options to map port 80 of the host to port 80 in the container:

Then click the "Deploy the container" button to start creating the container. After the container is created, it will be displayed in the Containers interface:

On this management interface, we can select one or more containers for operations, such as start, stop, kill, restart, pause, resume and remove. Of course, we can also add new containers through the "Add container" button. Next, we click on the container name "webdemo" in the red box to enter the container details interface:

This interface displays the details of a single container and the operations that can be performed on the container. At the top are operations for the container, followed by the container status, and then "Access control", "Create image", "Container details", "Volumes" and "Connected networks". For ease of display, I have collapsed the following categories.

In the container status area, you need to pay attention to Status, Logs, Console, and Inspect in the red box, which are what we usually care about. Click on them below to see the corresponding views.

The Container statistics view displays the resource information used by the container in real time. It should be noted that the relevant data is not persisted. The displayed content is always the data after opening this view each time:

The Container Logs view shows the log output from the container:

Through the console view we can execute commands in the container:

The Inspect view shows us detailed information about the container:

Managing manually created containers

Portainer is not limited to managing containers created by itself. Containers created through the command line can also be discovered and managed by portainer. For example, we create a container named mycon on the host console:

$ docker run --rm -id --name mycon ubuntu

Then refresh the container list interface of portainer:

The mycon container now appears in the container list.

Other operations

The Images, Networks, and Volumes items in the menu can be used to manage container images, networks, and data volumes respectively:

These differences are mostly the functions that are used more frequently!

In addition to managing stand-alone Docker, portainer can also manage Docker swarm clusters. The specific usage is not complicated, so I will not go into details here. Friends who are interested can refer to here.

refer to:
Portainer github
Portainer dockerhub
How to Manage Docker Containers using Portainer on Ubuntu
Portainer, a UI for Docker

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • In-depth understanding of uid and gid in docker containers
  • Docker daemon cannot start: does not match with stored UUID error solution

<<:  The difference between clientWidth, offsetWidth, scrollWidth in JavaScript

>>:  Summary of the use of Vue computed properties and listeners

Recommend

Detailed explanation of how to implement secondary cache with MySQL and Redis

Redis Introduction Redis is completely open sourc...

Implementation of CSS scroll bar style settings

webkit scrollbar style reset 1. The scrollbar con...

React Native environment installation process

react-native installation process 1.npx react-nat...

HTML Learning Notes--Detailed Explanation of HTML Syntax (Must Read)

1. What is HTML markup language? HTML is a markup...

A brief discussion on common operations of MySQL in cmd and python

Environment configuration 1: Install MySQL and ad...

Detailed steps and problem solving methods for installing MySQL 8.0.19 on Linux

I recently bought a Tencent Cloud server and buil...

How to deploy FastDFS in Docker

Install fastdfs on Docker Mount directory -v /e/f...

Detailed explanation of Mysql self-join query example

This article describes the Mysql self-join query....

How to insert video into HTML and make it compatible with all browsers

There are two most commonly used methods to insert...

Win32 MySQL 5.7.27 installation and configuration method graphic tutorial

The installation tutorial of MySQL 5.7.27 is reco...

MySQL query method with multiple conditions

mysql query with multiple conditions Environment:...

The best way to solve the 1px border on mobile devices (recommended)

When developing for mobile devices, you often enc...