【发布时间】:2019-01-28 19:53:01
【问题描述】:
我使用的是 dotnet core 2.1.3,Docker 版本 17.06.0-ce。 当我在 Visual Studio 2017 中运行应用程序时遇到问题,
**Error---Define and run multi-container applications with Docker.**
Usage:
docker-compose [-f <arg>...] [options] [COMMAND] [ARGS...]
docker-compose -h|--help
Options:
-f, --file FILE Specify an alternate compose file (default: docker-compose.yml)
-p, --project-name NAME Specify an alternate project name (default: directory name)
--verbose Show more output
-v, --version Print version and exit
-H, --host HOST Daemon socket to connect to
--tls Use TLS; implied by --tlsverify
--tlscacert CA_PATH Trust certs signed only by this CA
--tlscert CLIENT_CERT_PATH Path to TLS certificate file
--tlskey TLS_KEY_PATH Path to TLS key file
--tlsverify Use TLS and verify the remote
--skip-hostname-check Don't check the daemon's hostname against the name specified
in the client certificate (for example if your docker host
is an IP address)
--project-directory PATH Specify an alternate working directory
(default: the path of the Compose file)
docker -compose.yml 文件包含 版本:'3.4'
服务: 霍姆斯: 图片:霍姆斯 建造: 上下文:./HOMS dockerfile: Dockerfile
如需更多疑难解答信息,请转至http://aka.ms/DockerToolsTroubleshootingdocker-compose C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker .Compose.targets 195 5
提前致谢
【问题讨论】:
-
你实际运行的是什么命令?你有没有像
docker-compose.yml这样的源代码可以添加到问题中?如果您只运行不带参数的docker-compose,这看起来就像您得到的输出(不是错误本身,只是一条长帮助消息)。 -
感谢您的回复,在visual studio中运行应用程序,我没有使用任何命令,只需单击运行按钮。并且 docker -compose.yml 文件包含版本:'3.4' 服务:homs: image: homs build: context: ./HOMS dockerfile: Dockerfile
-
有解决办法吗?