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
1. The effect diagram implemented in this article...
This article example shares the specific code of ...
<br />How to remove the dividing lines of a ...
1. Select Edit → Virtual Network Editor in the me...
Table of contents 1. Download MySQL msi version 2...
Let’s start with a question Five years ago when I...
Recently, I encountered many problems when instal...
I have never been able to figure out whether the ...
A few days ago, when I was adjusting a module of a...
Table of contents introduce Installation and Usag...
I saw this question in the SQL training question ...
This article shares the specific code of vue unia...
Table of contents 1. Introduction to the basic fu...
pssh is an open source software implemented in Py...
wedge Because the MySQL version installed on the ...