我正在使用VS2017 Docker支持。VS为我创建了DockerFile,当我构建docker-compose文件时,它会创建容器并在172.xxx IP地址上运行应用程序。但是我想在本地主机上运行我的应用程序。
我做了很多事情,但没有任何效果。跟随docker docs作为启动器并构建microsoft示例应用程序。第二个链接运行正常,但是尝试第一个链接方法时出现HTTP错误404。
任何帮助表示赞赏。
docker dockerfile docker-for-windows asp.net-docker-extensions
I have a powershell script in host which copy some files and starts the container.
#Copy File
docker cp "D:\addApplication.ps1" website:/inetpub/wwwroot/
#Start Container
docker start website
Write-Host 'Process has started'
#Execute Container
docker exec -ti website powershell
#Run Script
Invoke-Expression "C:\inetpub\wwwroot\addApplication.ps1"
Run Code Online (Sandbox Code Playgroud)
Second last command executes fine but last command will only execute when I exit the container session and returns error(File Not Found which is because it finds that file on host)
Question: Is there anyway I can execute the …