0
votes

I am using dotnet core 2.1.3,Docker version 17.06.0-ce. when I run the application in visual studio 2017 getting issue,

**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 file contains version: '3.4'

services: homs: image: homs build: context: ./HOMS dockerfile: Dockerfile

For more troubleshooting information, go to 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

Thanks In Advance

3
What command are you actually running? Do you have any source code like a docker-compose.yml you could add to the question? That looks like the output you get if you just run docker-compose with no arguments (not an error per se, just a long help message). - David Maze
Thanks for reply,running the application in visual studio,I am not using any comand,just clicking the run button. and docker -compose.yml file contains version: '3.4' services: homs: image: homs build: context: ./HOMS dockerfile: Dockerfile - Gopi Nath
Got a solution? - Guilherme Ferreira

3 Answers

1
votes
  1. Check have you install docker compose yet? https://docs.docker.com/compose/install/
  2. Then run docker-compose up
0
votes

In order to help other people, I found out the error is also caused by an incorrect cmd line. For me, I was specifying -up in error - and I don't want to tell you how many times I looked at what I was certain was correct.!

I hope someone finds this helpful - Its very easy to make simple mistake and overlook them while looking for a more complicated reason for the problem.