Wednesday, 3 January 2024

docker-compose commands official documentation

 https://docs.docker.com/compose/reference/



You can also see this information by running docker compose --help from the command line.

Usage:  docker compose [OPTIONS] COMMAND

Define and run multi-container applications with Docker.

Options:
      --ansi string                Control when to print ANSI control characters ("never"|"always"|"auto") (default "auto")
      --compatibility              Run compose in backward compatibility mode
      --env-file stringArray       Specify an alternate environment file
  -f, --file stringArray           Compose configuration files
      --parallel int               Control max parallelism, -1 for unlimited (default -1)
      --profile stringArray        Specify a profile to enable
      --project-directory string   Specify an alternate working directory
                                   (default: the path of the, first specified, Compose file)
  -p, --project-name string        Project name



when you are in a dir with docker-compose.yml

you can run docker-compose up, docker-compose down etc


when you are not in same dir as docker-compose.yml such as makefile you can do :


docker-compose -f docker-compose.yml up

No comments:

Post a Comment