我正在使用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: 图片:霍姆斯 建立: 上下文:./ HOMS dockerfile:Dockerfile
有关更多故障排除信息,请转到http://aka.ms/DockerToolsTroubleshooting docker-compose C:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ Community \ MSBuild \ Sdks \ Microsoft.Docker.Sdk \ build \ Microsoft.VisualStudio .Docker.Compose.targets 195 5
预先感谢
答案 0 :(得分:1)
您需要安装docker compose。
答案 1 :(得分:1)
docker-compose up
答案 2 :(得分:0)
为了帮助其他人,我发现错误也是由错误的cmd行引起的。对我来说,我指定的错误是-up
-我不想告诉你我看了多少次是正确的。!
我希望有人能从中找到帮助-在寻找更复杂的问题原因时,很容易犯下简单的错误并忽略它们。