Solve the problem of not being able to access the port of the docker container under Windows 10 (port mapping problem) Installed docker and docker-compose on Windows 10 server And try to run the Nginx service in it, and the mapping is also done Problem: In the host's browser, opening localhost:port cannot access the corresponding Web service. Problem Analysis Reason: Docker runs on Linux. To run Docker in Windows, you actually need to first install a Linux environment under Windows and then run Docker in this system. That is to say, the localhost used in the service refers to the address of this Linux environment, not our host environment Windows 10. Solution Start the Docker command line window Enter the command
Linux IP address, usually this address is 192.168.99.100 Then in the Windows browser, enter http://IP:port to enable it (http://192.168.99.100:8069) Supplementary knowledge: Nacos 1.2.1 Nacos local deployment service, modifying the default port is invalid, Docker deployment does not have this problem 1. Scenario Description In the normal project development process, especially in the production environment deployment, we will try to avoid using sensitive ports. During this test, the default port 8848 of the server started by Nacos-server-1.2.1 startup.bat was changed to 8858, and Nacos could be accessed and logged in normally. However, when the project is started, the resource service of pulling 8848 is still obtained. Currently, this problem exists in nacos-server-1.2.1 and nacos-server-1.3.2. After testing, the Nacos service deployed via Docker does not have this problem after changing the default port. 2. Configuration steps Modify the port configuration of application.properties under conf in the nacos-server-1.2.1 folder to 8858 Start nacos-server-1.2.1 with startup.cmd Check whether the Nacos service is accessible normally Modify the address and port of the access discovery and configuration center in the project Start a Project 3. Solution ISSUE has been raised, you can follow the progress in time Deploy Nacos server using Docker Use the default port and do not modify the port The above article perfectly solves the problem of being unable to access the port of the docker container under Windows 10. This is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: How to implement responsiveness in Vue source code learning
>>: Things to note when writing self-closing XHTML tags
The tee command is mainly used to output to stand...
The first type: full CSS control, layer floating ...
Table of contents iview-admin2.0 built-in permiss...
Preface As we all know, bash (the B ourne-A gain ...
MySQL variables include system variables and syst...
This article shares the specific code of Vue usin...
Table of contents 1. React.FC<> 2. class xx...
Preface: The installation process will not be des...
I came into contact with CSS a long time ago, but...
The development history of CSS will not be introd...
Abstract: This article will demonstrate how to se...
Computed properties Sometimes we put too much log...
Table of contents 1. Script vim environment 2. Ho...
Without further ado, I will post the code for you...
Table of contents Standards for smooth animation ...