Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1646 from gtardif/docs_update
Browse files Browse the repository at this point in the history
Update compose docs
  • Loading branch information
ndeloof authored May 6, 2021
2 parents 4c0cbea + d61e625 commit 9432716
Show file tree
Hide file tree
Showing 7 changed files with 218 additions and 7 deletions.
31 changes: 25 additions & 6 deletions docs/reference/docker_compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,25 @@ long: "You can use compose subcommand, `docker compose [-f <arg>...] [options] [
pull db\n```\n\n### Use `-p` to specify a project name\n\nEach configuration has
a project name. If you supply a `-p` flag, you can specify a project name. If
you don’t \nspecify the flag, Compose uses the current directory name. \nProject
name can also be set by `COMPOSE_PROJECT_NAME` environment variable.\n\n### Use
profiles to enable optional services\n\nUse `--profile` to specify one or more
active profiles\nCalling `docker compose --profile frontend up` will start the
services with the profile `frontend` and services \nwithout any specified profiles.
\nYou can also enable multiple profiles, e.g. with `docker compose --profile frontend
--profile debug up` the profiles `frontend` and `debug` will be enabled.\n\nProfiles
name can also be set by `COMPOSE_PROJECT_NAME` environment variable.\n\nMost compose
subcommand can be ran without a compose file, just passing \nproject name to retrieve
the relevant resources.\n\n```\n$ docker compose -p my_project ps -a\nNAME SERVICE
\ STATUS PORTS\nmy_project_demo_1 demo running \n\n$
docker compose -p my_project logs\ndemo_1 | PING localhost (127.0.0.1): 56 data
bytes\ndemo_1 | 64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.095 ms\n```\n\n###
Use profiles to enable optional services\n\nUse `--profile` to specify one or
more active profiles\nCalling `docker compose --profile frontend up` will start
the services with the profile `frontend` and services \nwithout any specified
profiles. \nYou can also enable multiple profiles, e.g. with `docker compose --profile
frontend --profile debug up` the profiles `frontend` and `debug` will be enabled.\n\nProfiles
can also be set by `COMPOSE_PROFILES` environment variable.\n\n### Set up environment
variables\n\nYou can set environment variables for various docker-compose options,
including the `-f`, `-p` and `--profiles` flags.\n\nSetting the `COMPOSE_FILE`
environment variable is equivalent to passing the `-f` flag,\n`COMPOSE_PROJECT_NAME`
environment variable does the same for to the `-p` flag,\nand so does `COMPOSE_PROFILES`
environment variable for to the `--profiles` flag.\n\nIf flags are explicitly
set on command line, associated environment variable is ignored"
usage: docker compose
pname: docker
plink: docker.yaml
cname:
Expand All @@ -55,10 +61,12 @@ cname:
- docker compose down
- docker compose events
- docker compose exec
- docker compose images
- docker compose kill
- docker compose logs
- docker compose ls
- docker compose pause
- docker compose port
- docker compose ps
- docker compose pull
- docker compose push
Expand All @@ -77,10 +85,12 @@ clink:
- docker_compose_down.yaml
- docker_compose_events.yaml
- docker_compose_exec.yaml
- docker_compose_images.yaml
- docker_compose_kill.yaml
- docker_compose_logs.yaml
- docker_compose_ls.yaml
- docker_compose_pause.yaml
- docker_compose_port.yaml
- docker_compose_ps.yaml
- docker_compose_pull.yaml
- docker_compose_push.yaml
Expand Down Expand Up @@ -121,6 +131,15 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- option: no-ansi
value_type: bool
default_value: "false"
description: Do not print ANSI control characters (DEPRECATED)
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: profile
value_type: stringArray
default_value: '[]'
Expand Down
56 changes: 56 additions & 0 deletions docs/reference/docker_compose_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,62 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- option: compress
value_type: bool
default_value: "true"
description: Compress the build context using gzip. DEPRECATED
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: force-rm
value_type: bool
default_value: "true"
description: Always remove intermediate containers. DEPRECATED
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: memory
shorthand: m
value_type: string
description: |
Set memory limit for the build container. Not supported on buildkit yet.
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: no-cache
value_type: bool
default_value: "false"
description: Do not use cache when building the image
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: no-rm
value_type: bool
default_value: "false"
description: |
Do not remove intermediate containers after a successful build. DEPRECATED
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: parallel
value_type: bool
default_value: "true"
description: Build images in parallel. DEPRECATED
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: progress
value_type: string
default_value: auto
Expand Down
47 changes: 46 additions & 1 deletion docs/reference/docker_compose_convert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ short: Converts the compose file to platform's canonical format
long: "`docker compose convert` render the actual data model to be applied on target
platform. When used with Docker engine,\nit merges the Compose files set by `-f`
flags, resolves variables in Compose file, and expands short-notation into \nfully
defined Compose model."
defined Compose model. \n\nTo allow smooth migration from docker-compose, this
subcommand declares alias `docker compose config`"
usage: docker compose convert SERVICES
pname: docker compose
plink: docker_compose.yaml
Expand All @@ -18,6 +19,32 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- option: hash
value_type: string
description: Print the service config hash, one per line.
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: no-interpolate
value_type: bool
default_value: "false"
description: Don't interpolate environment variables.
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: profiles
value_type: bool
default_value: "false"
description: Print the profile names, one per line.
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: quiet
shorthand: q
value_type: bool
Expand All @@ -37,6 +64,24 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- option: services
value_type: bool
default_value: "false"
description: Print the service names, one per line.
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: volumes
value_type: bool
default_value: "false"
description: Print the volume names, one per line.
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: false
Expand Down
23 changes: 23 additions & 0 deletions docs/reference/docker_compose_images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
command: docker compose images
short: List images used by the created containers
long: List images used by the created containers
usage: docker compose images [SERVICE...]
pname: docker compose
plink: docker_compose.yaml
options:
- option: quiet
shorthand: q
value_type: bool
default_value: "false"
description: Only display IDs
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false

31 changes: 31 additions & 0 deletions docs/reference/docker_compose_port.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
command: docker compose port
short: Print the public port for a port binding.
long: Print the public port for a port binding.
usage: docker compose port [options] [--] SERVICE PRIVATE_PORT
pname: docker compose
plink: docker_compose.yaml
options:
- option: index
value_type: int
default_value: "1"
description: index of the container if service has multiple replicas
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: protocol
value_type: string
default_value: tcp
description: tcp or udp
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false

27 changes: 27 additions & 0 deletions docs/reference/docker_compose_pull.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ usage: docker compose pull [SERVICE...]
pname: docker compose
plink: docker_compose.yaml
options:
- option: ignore-pull-failures
value_type: bool
default_value: "false"
description: Pull what it can and ignores images with pull failures
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: include-deps
value_type: bool
default_value: "false"
Expand All @@ -15,6 +24,24 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- option: no-parallel
value_type: bool
default_value: "true"
description: DEPRECATED disable parallel pulling.
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: parallel
value_type: bool
default_value: "true"
description: DEPRECATED pull multiple images in parallel.
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: quiet
shorthand: q
value_type: bool
Expand Down
10 changes: 10 additions & 0 deletions docs/reference/docker_compose_rm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ usage: docker compose rm [SERVICE...]
pname: docker compose
plink: docker_compose.yaml
options:
- option: all
shorthand: a
value_type: bool
default_value: "false"
description: Deprecated - no effect
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: force
shorthand: f
value_type: bool
Expand Down

0 comments on commit 9432716

Please sign in to comment.