Article directory
Preface
DockerUI is a visual graphical management tool for docker container images. DockerUI can be used to easily build, manage and maintain docker environments. It's completely open source and free. Based on the container installation method, deployment is convenient and efficient, and you can browse and maintain docker single node or cluster node workers and managers. DockerUI has an easy-to-use interface. It doesn't require remembering docker instructions. Simply download the image to join and deploy immediately.
Using DockerUI combined with cpolar intranet penetration can make it easier to manage docker and swarm, achieving backend public network access and management, making it more visual and intuitive, and making backend development more convenient.
1. Install and deploy DockerUI
Install through docker container and pull the image
docker image pull joinsunsoft/docker.ui
Create container
docker run --restart always --name docker.ui -d -v /home/docker_data/docker.ui/docker.sock:/var/run/docker.sock -p 8999:8999 joinsunsoft/docker.ui
Open the browser and visit http://192.168.149.1:8999 (http://local IP:8999)
Default account password: ginghan 123456
After logging in, enter the DockerUI interface, and the local deployment access will be successful.
Docker containers can be managed and monitored through the web interface, and the image list can be viewed
When we need to enter DockerUI for container web management at home or on a business trip, at this time, combined with cpolar's intranet penetration, we can remotely access DockerUI and perform background operations, and achieve remote access from any browser anytime, anywhere, which greatly improves Improve work efficiency!
The following will explain how to install cpolar.
2. Install cpolar intranet penetration
We successfully installed and deployed DockerUI using Docker. Next, we installed the cpolar intranet penetration tool on Linux and forwarded the http public network address mapped to the local port through cpolar. We can easily achieve remote access without registering a domain name and purchasing a cloud server. .The following are the steps to install cpolar
cpolar official website address: https://www.cpolar.com
- Use one-click script installation command
curl -L https://www.cpolar.com/static/downloads/install-release-cpolar.sh | sudo bash
- Add services to the system
sudo systemctl enable cpolar
- Start cpolar service
sudo systemctl start cpolar
After cpolar is successfully installed, access Linux port 9200 on an external browser: [http://LAN ip:9200]. Log in using your cpolar account. After logging in, you can see the cpolar web configuration interface, which is connected to the web management interface. Just configure
3. Configure DockerUI public network access address
Click Tunnel Management - Create Tunnel on the left dashboard to create a DockerUI cpolar public network address tunnel!
- Tunnel name: The name can be customized. Be careful not to duplicate the existing tunnel name.
- Protocol: Select http
- Local address: 8999 (port for local access)
- Domain name type: Choose a random domain name for free
- Region: Select China Top
Click创建
After the tunnel is successfully created, click the status on the left - online tunnel list to view the generated public network access address. There are two access methods, one is http and https
4. Remote access to DockerUI from the public network
Use the cpolar https public network address above and access it from the browser of any device. You can successfully see the DockerUI management interface. Such a public network address that can be accessed remotely is created. Using the public network domain name of cpolar, no need If you purchase a cloud server yourself, you can publish it to the public network for remote access. If you log in with a new domain name, you may need to log in again!
5. Fixed DockerUI public network address
Since the tunnel created using cpolar above uses a random public network address, it will change randomly within 24 hours, which is not conducive to long-term remote access.
I usually use a fixed second-level subdomain name because I hope that when I send the URL to friends or colleagues around me for background collaboration, I can directly use the fixed public address to fill it in. It is a fixed and easy-to-remember public network address (for example: DockerUI.cpolar.cn), so we can configure a second-level subdomain name for it. This address is a fixed address and will not change randomly [ps: cpolar.cn has been filed]
Note that you need to upgrade the cpolar package to a basic package or above, and the bandwidth corresponding to each package is different. [cpolar.cn has been registered]
Log in to the cpolar official website, click Reserve on the left, select to reserve the second-level subdomain name, set a second-level subdomain name, click Reserve, and copy the reserved second-level subdomain name after the reservation is successful. Level subdomain name.
After the reservation is successful, copy the name of the second-level subdomain name that was successfully reserved.
Return to the cpolar web UI management interface, click Tunnel Management - Tunnel List on the left dashboard, find the tunnel you want to configure, and click Edit on the right
Modify the tunnel information and configure the successfully reserved second-level subdomain name into the tunnel.
- Domain name type: Select a second-level subdomain name
- Sub Domain: Fill in the successfully reserved second-level subdomain name
Click更新
(Note, click once to update, no need to submit again)
After the update is completed, open the online tunnel list. At this time, you can see that the public network address has changed and the address name has become a fixed second-level subdomain name.
Finally, we use a fixed public network address to access, and we can see that the access is successful. In this way, a fixed and permanent public network address is set, and the DockerUI interface can be remotely accessed anytime and anywhere, improving work efficiency!