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: 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:
|
<<: The difference between clientWidth, offsetWidth, scrollWidth in JavaScript
>>: Summary of the use of Vue computed properties and listeners
This article example shares the specific code of ...
Replication is to transfer the DDL and DML operat...
1. Indexing principle Indexes are used to quickly...
Since I usually use the docker build command to g...
1. Problem description <br />When JS is use...
MySQL previously had a query cache, Query Cache. ...
Use native JavaScript to simply implement the cou...
Please handle basic operations such as connecting...
Preface DISTINCT is actually very similar to the ...
Html code: Copy code The code is as follows: <t...
Start the mysql container in docekr Use command: ...
Page directory structure Note that you need to mo...
1. Command Introduction The userdel (user delete)...
View historical commands and execute specified co...
This article shares the specific code of jQuery t...