Hutchison can not access a docker springboot

Use project springboot jar package and docker file After building Mirror, run and maps port mirroring, host and browsers can not access;

After investigation found that the project application file has been specified port 10008, so the revised dockerfile in EXPOSE port (port random run image file), rebuild the mirror run, run inside the container curl: // http: localhost: 10008 successful visit, host curl: // http: container ip: 10008 successful visit, but Windows can not access the browser, will join the host vessel IP hosts file that is to solve the problem

Although the problem is resolved, but the principle still needs further study

FIG attachment configuration application

 

 

Guess you like

Origin www.cnblogs.com/lilinote/p/11974286.html