.Net Core publishing problems encountered when recording to Linux

The current problems encountered:

1. The case-sensitive path and the path of "/", instead of the usual "\\."

windows under the path: "xxxx \\ yyyy", the Linux path: "xxxx / yyyy"

Use   Path.Combine ( "xxxx", "yyyy ")  to merge to.

2. Sometimes you need to access services provided by the host in the docker container.

Such as container application needs to access the host mysql service, use   127.0.0.1  is not enough, because in this Docker containers which refers to the container itself.

Solution: Enter the terminal  ifconfig  command

ifconfig

Docker0 will see that ip, you can use this connection to the host. (Permission settings, ensure  127.0.0.1   able to connect to mysql)

Guess you like

Origin www.cnblogs.com/tenghao510/p/11995053.html