Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure remote connection in Docker

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

How to configure remote connection in Docker, many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can get something.

I. configure a remote connection

Enter the docker configuration file and modify the ExecStart

Vim / lib/systemd/system/docker.service / / enter the docker configuration file # modify ExecStart: (if you modify centos7 like this, other versions will be different ExecStart=/usr/bin/dockerd-H tcp://0.0.0.0:2375-H unix://var/run/docker.sock

The easiest way: replace the comment ExecStart with the one above

Reload the configuration and restart docker

Systemctl daemon-reload & & systemctl restart docker

test

# first test whether this machine can: dcocker images# test connectivity: curl http://localhost:2375/version# open port or turn off firewall direct access in the browser: http://ip:2375/versionhttp://ip:2375/info# other host access with docker installed: docker-H tcp://ip:2375 images

II. IDEA configuration

Idea configuration connection docker one-click publish

Install the plug-in

The first way: put the Dockerfile directly into the root directory to make it easy to specify the path of the packaged jar package. Run directly, Dockerfile in the next official account introduction.

Configure the run script:

The rightmost screenshot above.

Run run directly and go to Docker to see that the project is up and running. Enter the address in the browser to see that the project has been started.

Idea can also view some information about docke in real time, including images, running container, log information and so on.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report