mirror of https://github.com/docker/docs.git
compose: use relative markdown links
Unfortunately, the only reliable way to create internal links is to use relative links to other Markdown files. This does match the way links on GitHub work, but makes it harder to create these links. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
0fffff2ec5
commit
0f3caaca6a
|
@ -9,8 +9,8 @@ Compose to set up and run the sample ASP.NET Core application using the
|
|||
[.NET Core SDK image](https://hub.docker.com/_/microsoft-dotnet-core-sdk)
|
||||
with the
|
||||
[SQL Server on Linux image](https://hub.docker.com/_/microsoft-mssql-server).
|
||||
You just need to have [Docker Engine](/get-docker.md)
|
||||
and [Docker Compose](/compose/install.md) installed on your
|
||||
You just need to have [Docker Engine](../get-docker.md)
|
||||
and [Docker Compose](install.md) installed on your
|
||||
platform of choice: Linux, Mac or Windows.
|
||||
|
||||
For this sample, we create a sample .NET Core Web Application using the
|
||||
|
@ -25,8 +25,8 @@ configure this app to use our SQL Server database, and then create a
|
|||
1. Create a new directory for your application.
|
||||
|
||||
This directory is the context of your docker-compose project. For
|
||||
[Docker Desktop for Windows](/docker-for-windows/index.md#file-sharing) and
|
||||
[Docker Desktop for Mac](/docker-for-mac/index.md#file-sharing), you
|
||||
[Docker Desktop for Windows](../docker-for-windows/index.md#file-sharing) and
|
||||
[Docker Desktop for Mac](../docker-for-mac/index.md#file-sharing), you
|
||||
need to set up file sharing for the volume that you need to map.
|
||||
|
||||
1. Within your directory, use the `dotnet:2.1-sdk` Docker image to generate a
|
||||
|
@ -173,8 +173,8 @@ configure this app to use our SQL Server database, and then create a
|
|||
|
||||
1. Make sure you allocate at least 2GB of memory to Docker Engine. Here is how
|
||||
to do it on
|
||||
[Docker Desktop for Mac](/docker-for-mac/index.md#advanced) and
|
||||
[Docker Desktop for Windows](/docker-for-windows/index.md#advanced).
|
||||
[Docker Desktop for Mac](../docker-for-mac/index.md#advanced) and
|
||||
[Docker Desktop for Windows](../docker-for-windows/index.md#advanced).
|
||||
This is necessary to run the SQL Server on Linux container.
|
||||
|
||||
1. Run the `docker-compose up` command. After a few seconds, you should be able
|
||||
|
|
|
@ -121,5 +121,5 @@ Enjoy working with Compose faster and with fewer typos!
|
|||
- [Get started with Django](django.md)
|
||||
- [Get started with Rails](rails.md)
|
||||
- [Get started with WordPress](wordpress.md)
|
||||
- [Command line reference](/compose/reference/index.md)
|
||||
- [Compose file reference](/compose/compose-file/index.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
|
|
|
@ -99,7 +99,7 @@ cap_drop:
|
|||
```
|
||||
|
||||
> **Note**: These options are ignored when
|
||||
> [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md)
|
||||
> [deploying a stack in swarm mode](../../engine/reference/commandline/stack_deploy.md)
|
||||
> with a (version 3) Compose file.
|
||||
|
||||
### command
|
||||
|
@ -111,7 +111,7 @@ command: bundle exec thin -p 3000
|
|||
```
|
||||
|
||||
The command can also be a list, in a manner similar to
|
||||
[dockerfile](/engine/reference/builder.md#cmd):
|
||||
[dockerfile](../../engine/reference/builder.md#cmd):
|
||||
|
||||
```yaml
|
||||
command: ["bundle", "exec", "thin", "-p", "3000"]
|
||||
|
@ -184,7 +184,7 @@ entrypoint: /code/entrypoint.sh
|
|||
```
|
||||
|
||||
The entrypoint can also be a list, in a manner similar to
|
||||
[dockerfile](/engine/reference/builder.md#entrypoint):
|
||||
[dockerfile](../../engine/reference/builder.md#entrypoint):
|
||||
|
||||
```yaml
|
||||
entrypoint: ["php", "-d", "memory_limit=-1", "vendor/bin/phpunit"]
|
||||
|
@ -332,7 +332,7 @@ indefinitely. Compose does not support circular references and `docker-compose`
|
|||
returns an error if it encounters one.
|
||||
|
||||
For more on `extends`, see the
|
||||
[the extends documentation](/compose/extends.md#extending-services).
|
||||
[the extends documentation](../extends.md#extending-services).
|
||||
|
||||
### external_links
|
||||
|
||||
|
@ -396,7 +396,7 @@ options and tags it with the specified tag.
|
|||
|
||||
### labels
|
||||
|
||||
Add metadata to containers using [Docker labels](/config/labels-custom-metadata.md). You can use either an array or a dictionary.
|
||||
Add metadata to containers using [Docker labels](../../config/labels-custom-metadata.md). You can use either an array or a dictionary.
|
||||
|
||||
It's recommended that you use reverse-DNS notation to prevent your labels from conflicting with those used by other software.
|
||||
|
||||
|
@ -420,7 +420,7 @@ Link to containers in another service. Either specify both the service name and
|
|||
a link alias (`"SERVICE:ALIAS"`), or just the service name.
|
||||
|
||||
> Links are a legacy option. We recommend using
|
||||
> [networks](/compose/networking.md) instead.
|
||||
> [networks](../networking.md) instead.
|
||||
|
||||
```yaml
|
||||
web:
|
||||
|
@ -603,7 +603,7 @@ There are several things to note, depending on which
|
|||
For example, if you specify a mapping of `./foo:/data`, the `./foo` part
|
||||
is passed straight to the volume driver without being expanded.
|
||||
|
||||
See [Docker Volumes](/storage/volumes.md) and
|
||||
See [Docker Volumes](../../storage/volumes.md) and
|
||||
[Volume Plugins](/engine/extend/plugins_volume/) for more information.
|
||||
|
||||
### volumes_from
|
||||
|
@ -621,7 +621,7 @@ volumes_from:
|
|||
### cpu\_shares, cpu\_quota, cpuset, domainname, hostname, ipc, mac\_address, mem\_limit, memswap\_limit, mem\_swappiness, privileged, read\_only, restart, shm\_size, stdin\_open, tty, user, working\_dir
|
||||
|
||||
Each of these is a single value, analogous to its
|
||||
[docker run](/engine/reference/run.md) counterpart.
|
||||
[docker run](../../engine/reference/run.md) counterpart.
|
||||
|
||||
```yaml
|
||||
cpu_shares: 73
|
||||
|
@ -650,8 +650,8 @@ tty: true
|
|||
|
||||
## Compose documentation
|
||||
|
||||
- [User guide](/compose/index.md)
|
||||
- [Installing Compose](/compose/install.md)
|
||||
- [User guide](../index.md)
|
||||
- [Installing Compose](../install.md)
|
||||
- [Compose file versions and upgrading](compose-versioning.md)
|
||||
- [Samples](/samples/index.md)
|
||||
- [Command line reference](/compose/reference/index.md)
|
||||
- [Samples](../../samples/index.md)
|
||||
- [Command line reference](../reference/index.md)
|
||||
|
|
|
@ -215,7 +215,7 @@ build:
|
|||
> In your Dockerfile, if you specify `ARG` before the `FROM` instruction,
|
||||
> `ARG` is not available in the build instructions under `FROM`.
|
||||
> If you need an argument to be available in both places, also specify it under
|
||||
> the `FROM` instruction. Refer to the [understand how ARGS and FROM interact](/engine/reference/builder.md#understand-how-arg-and-from-interact)
|
||||
> the `FROM` instruction. Refer to the [understand how ARGS and FROM interact](../../engine/reference/builder.md#understand-how-arg-and-from-interact)
|
||||
> section in the documentation for usage details.
|
||||
|
||||
You can omit the value when specifying a build argument, in which case its value
|
||||
|
@ -271,7 +271,7 @@ An entry with the ip address and hostname is created in `/etc/hosts` inside cont
|
|||
Specify a build’s container isolation technology. On Linux, the only supported value
|
||||
is `default`. On Windows, acceptable values are `default`, `process` and
|
||||
`hyperv`. Refer to the
|
||||
[Docker Engine docs](/engine/reference/commandline/run.md#specify-isolation-technology-for-container---isolation)
|
||||
[Docker Engine docs](../../engine/reference/commandline/run.md#specify-isolation-technology-for-container---isolation)
|
||||
for details.
|
||||
|
||||
If unspecified, Compose will use the `isolation` value found in the service's definition
|
||||
|
@ -281,7 +281,7 @@ to determine the value to use for builds.
|
|||
|
||||
> Added in [version 2.1](compose-versioning.md#version-21) file format
|
||||
|
||||
Add metadata to the resulting image using [Docker labels](/config/labels-custom-metadata.md).
|
||||
Add metadata to the resulting image using [Docker labels](../../config/labels-custom-metadata.md).
|
||||
You can use either an array or a dictionary.
|
||||
|
||||
It's recommended that you use reverse-DNS notation to prevent your labels from
|
||||
|
@ -357,7 +357,7 @@ build:
|
|||
> Added in [version 2.3](compose-versioning.md#version-23) file format
|
||||
|
||||
Build the specified stage as defined inside the `Dockerfile`. See the
|
||||
[multi-stage build docs](/develop/develop-images/multistage-build.md) for
|
||||
[multi-stage build docs](../../develop/develop-images/multistage-build.md) for
|
||||
details.
|
||||
|
||||
```yaml
|
||||
|
@ -397,7 +397,7 @@ command: bundle exec thin -p 3000
|
|||
```
|
||||
|
||||
The command can also be a list, in a manner similar to
|
||||
[dockerfile](/engine/reference/builder.md#cmd):
|
||||
[dockerfile](../../engine/reference/builder.md#cmd):
|
||||
|
||||
```yaml
|
||||
command: ["bundle", "exec", "thin", "-p", "3000"]
|
||||
|
@ -490,7 +490,7 @@ services:
|
|||
>
|
||||
> `depends_on` does not wait for `db` and `redis` to be "ready" before
|
||||
> starting `web` - only until they have been started. If you need to wait
|
||||
> for a service to be ready, see [Controlling startup order](/compose/startup-order.md)
|
||||
> for a service to be ready, see [Controlling startup order](../startup-order.md)
|
||||
> for more on this problem and strategies for solving it.
|
||||
|
||||
> Added in [version 2.1](compose-versioning.md#version-21) file format.
|
||||
|
@ -572,7 +572,7 @@ entrypoint: /code/entrypoint.sh
|
|||
```
|
||||
|
||||
The entrypoint can also be a list, in a manner similar to
|
||||
[dockerfile](/engine/reference/builder.md#entrypoint):
|
||||
[dockerfile](../../engine/reference/builder.md#entrypoint):
|
||||
|
||||
```yaml
|
||||
entrypoint: ["php", "-d", "memory_limit=-1", "vendor/bin/phpunit"]
|
||||
|
@ -728,7 +728,7 @@ indefinitely. Compose does not support circular references and `docker-compose`
|
|||
returns an error if it encounters one.
|
||||
|
||||
For more on `extends`, see the
|
||||
[the extends documentation](/compose/extends.md#extending-services).
|
||||
[the extends documentation](../extends.md#extending-services).
|
||||
|
||||
### external_links
|
||||
|
||||
|
@ -776,7 +776,7 @@ host system to be added. An example of where this is useful is when multiple
|
|||
containers (running as different users) need to all read or write the same
|
||||
file on the host system. That file can be owned by a group shared by all the
|
||||
containers, and specified in `group_add`. See the
|
||||
[Docker documentation](/engine/reference/run.md#additional-groups) for more
|
||||
[Docker documentation](../../engine/reference/run.md#additional-groups) for more
|
||||
details.
|
||||
|
||||
A full example:
|
||||
|
@ -800,7 +800,7 @@ used.
|
|||
|
||||
Configure a check that's run to determine whether or not containers for this
|
||||
service are "healthy". See the docs for the
|
||||
[HEALTHCHECK Dockerfile instruction](/engine/reference/builder.md#healthcheck)
|
||||
[HEALTHCHECK Dockerfile instruction](../../engine/reference/builder.md#healthcheck)
|
||||
for details on how healthchecks work.
|
||||
|
||||
```yaml
|
||||
|
@ -889,7 +889,7 @@ services:
|
|||
> The default init binary that is used is [Tini](https://github.com/krallin/tini),
|
||||
> and is installed in `/usr/libexec/docker-init` on the daemon host. You can
|
||||
> configure the daemon to use a custom init binary through the
|
||||
> [`init-path` configuration option](/engine/reference/commandline/dockerd.md#daemon-configuration-file).
|
||||
> [`init-path` configuration option](../../engine/reference/commandline/dockerd.md#daemon-configuration-file).
|
||||
|
||||
### isolation
|
||||
|
||||
|
@ -898,12 +898,12 @@ services:
|
|||
Specify a container’s isolation technology. On Linux, the only supported value
|
||||
is `default`. On Windows, acceptable values are `default`, `process` and
|
||||
`hyperv`. Refer to the
|
||||
[Docker Engine docs](/engine/reference/commandline/run.md#specify-isolation-technology-for-container---isolation)
|
||||
[Docker Engine docs](../../engine/reference/commandline/run.md#specify-isolation-technology-for-container---isolation)
|
||||
for details.
|
||||
|
||||
### labels
|
||||
|
||||
Add metadata to containers using [Docker labels](/config/labels-custom-metadata.md). You can use either an array or a dictionary.
|
||||
Add metadata to containers using [Docker labels](../../config/labels-custom-metadata.md). You can use either an array or a dictionary.
|
||||
|
||||
It's recommended that you use reverse-DNS notation to prevent your labels from conflicting with those used by other software.
|
||||
|
||||
|
@ -942,7 +942,7 @@ the alias, or the service name if no alias was specified.
|
|||
|
||||
Links are not required to enable services to communicate - by default,
|
||||
any service can reach any other service at that service’s name. (See also, the
|
||||
[Links topic in Networking in Compose](/compose/networking.md#links).)
|
||||
[Links topic in Networking in Compose](../networking.md#links).)
|
||||
|
||||
Links also express dependency between services in the same way as
|
||||
[depends_on](#depends_on), so they determine the order of service startup.
|
||||
|
@ -966,7 +966,7 @@ logging:
|
|||
|
||||
The `driver` name specifies a logging driver for the service's
|
||||
containers, as with the ``--log-driver`` option for docker run
|
||||
([documented here](/config/containers/logging/configure.md)).
|
||||
([documented here](../../config/containers/logging/configure.md)).
|
||||
|
||||
The default value is json-file.
|
||||
|
||||
|
@ -1296,7 +1296,7 @@ web:
|
|||
Specify the default number of containers to deploy for this service. Whenever
|
||||
you run `docker-compose up`, Compose creates or removes containers to match
|
||||
the specified number. This value can be overridden using the
|
||||
[`--scale`](/compose/reference/up.md) flag.
|
||||
[`--scale`](../reference/up.md) flag.
|
||||
|
||||
```yaml
|
||||
web:
|
||||
|
@ -1497,7 +1497,7 @@ volumes:
|
|||
> When creating bind mounts, using the long syntax requires the
|
||||
> referenced folder to be created beforehand. Using the short syntax
|
||||
> creates the folder on the fly if it doesn't exist.
|
||||
> See the [bind mounts documentation](/storage/bind-mounts.md#differences-between--v-and---mount-behavior)
|
||||
> See the [bind mounts documentation](../../storage/bind-mounts.md#differences-between--v-and---mount-behavior)
|
||||
> for more information.
|
||||
|
||||
### volume\_driver
|
||||
|
@ -1518,7 +1518,7 @@ volume_driver: mydriver
|
|||
> entry in the [top-level `volumes` option](#volume-configuration-reference).
|
||||
|
||||
|
||||
See [Docker Volumes](/storage/volumes.md) and
|
||||
See [Docker Volumes](../../storage/volumes.md) and
|
||||
[Volume Plugins](/engine/extend/plugins_volume/) for more information.
|
||||
|
||||
### volumes_from
|
||||
|
@ -1568,7 +1568,7 @@ restart: unless-stopped
|
|||
### cpu_count, cpu_percent, cpu\_shares, cpu\_period, cpu\_quota, cpus, cpuset, domainname, hostname, ipc, mac\_address, mem\_limit, memswap\_limit, mem\_swappiness, mem\_reservation, oom_kill_disable, oom_score_adj, privileged, read\_only, shm\_size, stdin\_open, tty, user, working\_dir
|
||||
|
||||
Each of these is a single value, analogous to its
|
||||
[docker run](/engine/reference/run.md#runtime-constraints-on-resources) counterpart.
|
||||
[docker run](../../engine/reference/run.md#runtime-constraints-on-resources) counterpart.
|
||||
|
||||
> Added in [version 2.2](compose-versioning.md#version-22) file format.
|
||||
>
|
||||
|
@ -1646,10 +1646,10 @@ While it is possible to declare [volumes](#volumes) on the fly as part of the
|
|||
service declaration, this section allows you to create named volumes that can be
|
||||
reused across multiple services (without relying on `volumes_from`), and are
|
||||
easily retrieved and inspected using the docker command line or API.
|
||||
See the [docker volume](/engine/reference/commandline/volume_create.md)
|
||||
See the [docker volume](../../engine/reference/commandline/volume_create.md)
|
||||
subcommand documentation for more information.
|
||||
|
||||
See [use volumes](/storage/volumes.md) and [volume plugins](/engine/extend/plugins_volume/)
|
||||
See [use volumes](../../storage/volumes.md) and [volume plugins](/engine/extend/plugins_volume/)
|
||||
for general information on volumes.
|
||||
|
||||
Here's an example of a two-service setup where a database's data directory is
|
||||
|
@ -1752,7 +1752,7 @@ volumes:
|
|||
> Added in [version 2.1](compose-versioning.md#version-21) file format.
|
||||
|
||||
Add metadata to containers using
|
||||
[Docker labels](/config/labels-custom-metadata.md). You can use either
|
||||
[Docker labels](../../config/labels-custom-metadata.md). You can use either
|
||||
an array or a dictionary.
|
||||
|
||||
It's recommended that you use reverse-DNS notation to prevent your labels from
|
||||
|
@ -1801,7 +1801,7 @@ volumes:
|
|||
|
||||
The top-level `networks` key lets you specify networks to be created. For a full
|
||||
explanation of Compose's use of Docker networking features, see the
|
||||
[Networking guide](/compose/networking.md).
|
||||
[Networking guide](../networking.md).
|
||||
|
||||
### driver
|
||||
|
||||
|
@ -1885,7 +1885,7 @@ you can set this option to `true`.
|
|||
> Added in [version 2.1](compose-versioning.md#version-21) file format.
|
||||
|
||||
Add metadata to containers using
|
||||
[Docker labels](/config/labels-custom-metadata.md). You can use either
|
||||
[Docker labels](../../config/labels-custom-metadata.md). You can use either
|
||||
an array or a dictionary.
|
||||
|
||||
It's recommended that you use reverse-DNS notation to prevent your labels from
|
||||
|
@ -1991,8 +1991,8 @@ networks:
|
|||
|
||||
## Compose documentation
|
||||
|
||||
- [User guide](/compose/index.md)
|
||||
- [Installing Compose](/compose/install.md)
|
||||
- [User guide](../index.md)
|
||||
- [Installing Compose](../install.md)
|
||||
- [Compose file versions and upgrading](compose-versioning.md)
|
||||
- [Samples](/samples/index.md)
|
||||
- [Command line reference](/compose/reference/index.md)
|
||||
- [Samples](../../samples/index.md)
|
||||
- [Command line reference](../reference/index.md)
|
||||
|
|
|
@ -50,7 +50,7 @@ omitting a `version` key at the root of the YAML.
|
|||
|
||||
- Version 3.x, the latest and recommended version, designed to
|
||||
be cross-compatible between Compose and the Docker Engine's
|
||||
[swarm mode](/engine/swarm/index.md). This is specified with a `version: '3'` or `version: '3.1'`, etc., entry at the root of the YAML.
|
||||
[swarm mode](../../engine/swarm/index.md). This is specified with a `version: '3'` or `version: '3.1'`, etc., entry at the root of the YAML.
|
||||
|
||||
> ### v2 and v3 Declaration
|
||||
>
|
||||
|
@ -65,8 +65,8 @@ To move your project to a later version, see the [Upgrading](#upgrading)
|
|||
section.
|
||||
|
||||
> **Note**: If you're using
|
||||
> [multiple Compose files](/compose/extends.md#multiple-compose-files) or
|
||||
> [extending services](/compose/extends.md#extending-services), each file must be of the
|
||||
> [multiple Compose files](../extends.md#multiple-compose-files) or
|
||||
> [extending services](../extends.md#extending-services), each file must be of the
|
||||
> same version - you cannot, for example, mix version 1 and 2 in a single
|
||||
> project.
|
||||
|
||||
|
@ -91,7 +91,7 @@ Version 1 files cannot declare named
|
|||
[volumes](index.md#volume-configuration-reference), [networks](index.md#network-configuration-reference) or
|
||||
[build arguments](index.md#args).
|
||||
|
||||
Compose does not take advantage of [networking](/compose/networking.md) when you
|
||||
Compose does not take advantage of [networking](../networking.md) when you
|
||||
use version 1: every container is placed on the default `bridge` network and is
|
||||
reachable from every other container at its IP address. You need to use
|
||||
[links](compose-file-v1.md#links) to enable discovery between containers.
|
||||
|
@ -125,7 +125,7 @@ under the `networks` key.
|
|||
By default, every container joins an application-wide default network, and is
|
||||
discoverable at a hostname that's the same as the service name. This means
|
||||
[links](compose-file-v2.md#links) are largely unnecessary. For more details, see
|
||||
[Networking in Compose](/compose/networking.md).
|
||||
[Networking in Compose](../networking.md).
|
||||
|
||||
> **Note**: When specifying the Compose file version to use, make sure to
|
||||
> specify both the _major_ and _minor_ numbers. If no minor version is given,
|
||||
|
@ -278,7 +278,7 @@ several more.
|
|||
- Removed: `volume_driver`, `volumes_from`, `cpu_shares`, `cpu_quota`,
|
||||
`cpuset`, `mem_limit`, `memswap_limit`, `extends`, `group_add`. See
|
||||
the [upgrading](#upgrading) guide for how to migrate away from these.
|
||||
(For more information on `extends`, see [Extending services](/compose/extends.md#extending-services).)
|
||||
(For more information on `extends`, see [Extending services](../extends.md#extending-services).)
|
||||
|
||||
- Added: [deploy](index.md#deploy)
|
||||
|
||||
|
@ -408,7 +408,7 @@ several options have been removed:
|
|||
`docker stack deploy`, and is ignored by `docker-compose`.
|
||||
|
||||
- `extends`: This option has been removed for `version: "3.x"`
|
||||
Compose files. (For more information, see [Extending services](/compose/extends.md#extending-services).)
|
||||
Compose files. (For more information, see [Extending services](../extends.md#extending-services).)
|
||||
- `group_add`: This option has been removed for `version: "3.x"` Compose files.
|
||||
- `pids_limit`: This option has not been introduced in `version: "3.x"` Compose files.
|
||||
- `link_local_ips` in `networks`: This option has not been introduced in
|
||||
|
@ -437,7 +437,7 @@ It's more complicated if you're using particular configuration features:
|
|||
syslog-address: "tcp://192.168.0.42:123"
|
||||
|
||||
- `links` with environment variables: As documented in the
|
||||
[environment variables reference](/compose/link-env-deprecated.md), environment variables
|
||||
[environment variables reference](../link-env-deprecated.md), environment variables
|
||||
created by
|
||||
links have been deprecated for some time. In the new Docker network system,
|
||||
they have been removed. You should either connect directly to the
|
||||
|
@ -456,9 +456,9 @@ It's more complicated if you're using particular configuration features:
|
|||
communicate, even if explicitly linked together.
|
||||
|
||||
Either connect the external container to your app's
|
||||
[default network](/compose/networking.md), or connect both the external container and
|
||||
[default network](../networking.md), or connect both the external container and
|
||||
your service's containers to an
|
||||
[external network](/compose/networking.md#use-a-pre-existing-network).
|
||||
[external network](../networking.md#use-a-pre-existing-network).
|
||||
|
||||
- `net`: This is now replaced by [network_mode](index.md#network_mode):
|
||||
|
||||
|
|
|
@ -208,7 +208,7 @@ This results in an image named `webapp` and tagged `tag`, built from `./dir`.
|
|||
> Note when using docker stack deploy
|
||||
>
|
||||
> The `build` option is ignored when
|
||||
> [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md)
|
||||
> [deploying a stack in swarm mode](../../engine/reference/commandline/stack_deploy.md)
|
||||
> The `docker stack` command does not build images before deploying.
|
||||
{: .important }
|
||||
|
||||
|
@ -280,7 +280,7 @@ build:
|
|||
> In your Dockerfile, if you specify `ARG` before the `FROM` instruction,
|
||||
> `ARG` is not available in the build instructions under `FROM`.
|
||||
> If you need an argument to be available in both places, also specify it under
|
||||
> the `FROM` instruction. Refer to the [understand how ARGS and FROM interact](/engine/reference/builder.md#understand-how-arg-and-from-interact)
|
||||
> the `FROM` instruction. Refer to the [understand how ARGS and FROM interact](../../engine/reference/builder.md#understand-how-arg-and-from-interact)
|
||||
> section in the documentation for usage details.
|
||||
|
||||
You can omit the value when specifying a build argument, in which case its value
|
||||
|
@ -316,7 +316,7 @@ build:
|
|||
|
||||
> Added in [version 3.3](compose-versioning.md#version-33) file format
|
||||
|
||||
Add metadata to the resulting image using [Docker labels](/config/labels-custom-metadata.md).
|
||||
Add metadata to the resulting image using [Docker labels](../../config/labels-custom-metadata.md).
|
||||
You can use either an array or a dictionary.
|
||||
|
||||
It's recommended that you use reverse-DNS notation to prevent your labels from
|
||||
|
@ -392,7 +392,7 @@ build:
|
|||
> Added in [version 3.4](compose-versioning.md#version-34) file format
|
||||
|
||||
Build the specified stage as defined inside the `Dockerfile`. See the
|
||||
[multi-stage build docs](/develop/develop-images/multistage-build.md) for
|
||||
[multi-stage build docs](../../develop/develop-images/multistage-build.md) for
|
||||
details.
|
||||
|
||||
```yaml
|
||||
|
@ -418,7 +418,7 @@ cap_drop:
|
|||
> Note when using docker stack deploy
|
||||
>
|
||||
> The `cap_add` and `cap_drop` options are ignored when
|
||||
> [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md)
|
||||
> [deploying a stack in swarm mode](../../engine/reference/commandline/stack_deploy.md)
|
||||
{: .important }
|
||||
|
||||
### cgroup_parent
|
||||
|
@ -432,7 +432,7 @@ cgroup_parent: m-executor-abcd
|
|||
> Note when using docker stack deploy
|
||||
>
|
||||
> The `cgroup_parent` option is ignored when
|
||||
> [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md)
|
||||
> [deploying a stack in swarm mode](../../engine/reference/commandline/stack_deploy.md)
|
||||
{: .important }
|
||||
|
||||
### command
|
||||
|
@ -444,7 +444,7 @@ command: bundle exec thin -p 3000
|
|||
```
|
||||
|
||||
The command can also be a list, in a manner similar to
|
||||
[dockerfile](/engine/reference/builder.md#cmd):
|
||||
[dockerfile](../../engine/reference/builder.md#cmd):
|
||||
|
||||
```yaml
|
||||
command: ["bundle", "exec", "thin", "-p", "3000"]
|
||||
|
@ -459,7 +459,7 @@ configuration. Two different syntax variants are supported.
|
|||
> [defined in the top-level `configs` configuration](#configs-configuration-reference)
|
||||
> of this stack file, or stack deployment fails.
|
||||
|
||||
For more information on configs, see [configs](/engine/swarm/configs.md).
|
||||
For more information on configs, see [configs](../../engine/swarm/configs.md).
|
||||
|
||||
#### Short syntax
|
||||
|
||||
|
@ -561,7 +561,7 @@ an error.
|
|||
> Note when using docker stack deploy
|
||||
>
|
||||
> The `container_name` option is ignored when
|
||||
> [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md)
|
||||
> [deploying a stack in swarm mode](../../engine/reference/commandline/stack_deploy.md)
|
||||
{: .important }
|
||||
|
||||
### credential_spec
|
||||
|
@ -649,11 +649,11 @@ services:
|
|||
>
|
||||
> - `depends_on` does not wait for `db` and `redis` to be "ready" before
|
||||
> starting `web` - only until they have been started. If you need to wait
|
||||
> for a service to be ready, see [Controlling startup order](/compose/startup-order.md)
|
||||
> for a service to be ready, see [Controlling startup order](../startup-order.md)
|
||||
> for more on this problem and strategies for solving it.
|
||||
> - Version 3 no longer supports the `condition` form of `depends_on`.
|
||||
> - The `depends_on` option is ignored when
|
||||
> [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md)
|
||||
> [deploying a stack in swarm mode](../../engine/reference/commandline/stack_deploy.md)
|
||||
> with a version 3 Compose file.
|
||||
|
||||
### deploy
|
||||
|
@ -661,8 +661,8 @@ services:
|
|||
> Added in [version 3](compose-versioning.md#version-3) file format.
|
||||
|
||||
Specify configuration related to the deployment and running of services. This
|
||||
only takes effect when deploying to a [swarm](/engine/swarm/index.md) with
|
||||
[docker stack deploy](/engine/reference/commandline/stack_deploy.md), and is
|
||||
only takes effect when deploying to a [swarm](../../engine/swarm/index.md) with
|
||||
[docker stack deploy](../../engine/reference/commandline/stack_deploy.md), and is
|
||||
ignored by `docker-compose up` and `docker-compose run`.
|
||||
|
||||
```yaml
|
||||
|
@ -735,12 +735,12 @@ networks:
|
|||
```
|
||||
|
||||
The options for `endpoint_mode` also work as flags on the swarm mode CLI command
|
||||
[docker service create](/engine/reference/commandline/service_create.md). For a
|
||||
[docker service create](../../engine/reference/commandline/service_create.md). For a
|
||||
quick list of all swarm related `docker` commands, see
|
||||
[Swarm mode CLI commands](/engine/swarm/index.md#swarm-mode-key-concepts-and-tutorial).
|
||||
[Swarm mode CLI commands](../../engine/swarm/index.md#swarm-mode-key-concepts-and-tutorial).
|
||||
|
||||
To learn more about service discovery and networking in swarm mode, see
|
||||
[Configure service discovery](/engine/swarm/networking.md#configure-service-discovery)
|
||||
[Configure service discovery](../../engine/swarm/networking.md#configure-service-discovery)
|
||||
in the swarm mode topics.
|
||||
|
||||
|
||||
|
@ -774,8 +774,8 @@ services:
|
|||
|
||||
Either `global` (exactly one container per swarm node) or `replicated` (a
|
||||
specified number of containers). The default is `replicated`. (To learn more,
|
||||
see [Replicated and global services](/engine/swarm/how-swarm-mode-works/services.md#replicated-and-global-services)
|
||||
in the [swarm](/engine/swarm/index.md) topics.)
|
||||
see [Replicated and global services](../../engine/swarm/how-swarm-mode-works/services.md#replicated-and-global-services)
|
||||
in the [swarm](../../engine/swarm/index.md) topics.)
|
||||
|
||||
|
||||
```yaml
|
||||
|
@ -862,7 +862,7 @@ Configures resource constraints.
|
|||
> to learn about differences between version 2 and 3 of the compose-file format.
|
||||
|
||||
Each of these is a single value, analogous to its
|
||||
[docker service create](/engine/reference/commandline/service_create.md) counterpart.
|
||||
[docker service create](../../engine/reference/commandline/service_create.md) counterpart.
|
||||
|
||||
In this general example, the `redis` service is constrained to use no more than
|
||||
50M of memory and `0.50` (50% of a single core) of available processing time (CPU),
|
||||
|
@ -902,7 +902,7 @@ If your services or containers attempt to use more memory than the system has
|
|||
available, you may experience an Out Of Memory Exception (OOME) and a container,
|
||||
or the Docker daemon, might be killed by the kernel OOM killer. To prevent this
|
||||
from happening, ensure that your application runs on hosts with adequate memory
|
||||
and see [Understand the risks of running out of memory](/config/containers/resource_constraints.md#understand-the-risks-of-running-out-of-memory).
|
||||
and see [Understand the risks of running out of memory](../../config/containers/resource_constraints.md#understand-the-risks-of-running-out-of-memory).
|
||||
|
||||
|
||||
#### restart_policy
|
||||
|
@ -1019,7 +1019,7 @@ devices:
|
|||
> Note when using docker stack deploy
|
||||
>
|
||||
> The `devices` option is ignored when
|
||||
> [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md)
|
||||
> [deploying a stack in swarm mode](../../engine/reference/commandline/stack_deploy.md)
|
||||
{: .important }
|
||||
|
||||
### dns
|
||||
|
@ -1059,7 +1059,7 @@ entrypoint: /code/entrypoint.sh
|
|||
```
|
||||
|
||||
The entrypoint can also be a list, in a manner similar to
|
||||
[dockerfile](/engine/reference/builder.md#entrypoint):
|
||||
[dockerfile](../../engine/reference/builder.md#entrypoint):
|
||||
|
||||
```yaml
|
||||
entrypoint: ["php", "-d", "memory_limit=-1", "vendor/bin/phpunit"]
|
||||
|
@ -1209,7 +1209,7 @@ external_links:
|
|||
> Note when using docker stack deploy
|
||||
>
|
||||
> The `external_links` option is ignored when
|
||||
> [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md)
|
||||
> [deploying a stack in swarm mode](../../engine/reference/commandline/stack_deploy.md)
|
||||
{: .important }
|
||||
|
||||
### extra_hosts
|
||||
|
@ -1233,7 +1233,7 @@ An entry with the ip address and hostname is created in `/etc/hosts` inside cont
|
|||
|
||||
Configure a check that's run to determine whether or not containers for this
|
||||
service are "healthy". See the docs for the
|
||||
[HEALTHCHECK Dockerfile instruction](/engine/reference/builder.md#healthcheck)
|
||||
[HEALTHCHECK Dockerfile instruction](../../engine/reference/builder.md#healthcheck)
|
||||
for details on how healthchecks work.
|
||||
|
||||
```yaml
|
||||
|
@ -1329,12 +1329,12 @@ services:
|
|||
Specify a container’s isolation technology. On Linux, the only supported value
|
||||
is `default`. On Windows, acceptable values are `default`, `process` and
|
||||
`hyperv`. Refer to the
|
||||
[Docker Engine docs](/engine/reference/commandline/run.md#specify-isolation-technology-for-container---isolation)
|
||||
[Docker Engine docs](../../engine/reference/commandline/run.md#specify-isolation-technology-for-container---isolation)
|
||||
for details.
|
||||
|
||||
### labels
|
||||
|
||||
Add metadata to containers using [Docker labels](/config/labels-custom-metadata.md). You can use either an array or a dictionary.
|
||||
Add metadata to containers using [Docker labels](../../config/labels-custom-metadata.md). You can use either an array or a dictionary.
|
||||
|
||||
It's recommended that you use reverse-DNS notation to prevent your labels from conflicting with those used by other software.
|
||||
|
||||
|
@ -1358,7 +1358,7 @@ labels:
|
|||
>
|
||||
> The `--link` flag is a legacy feature of Docker. It may eventually be removed.
|
||||
> Unless you absolutely need to continue using it, we recommend that you use
|
||||
> [user-defined networks](/compose/networking.md)
|
||||
> [user-defined networks](../networking.md)
|
||||
> to facilitate communication between two containers instead of using `--link`.
|
||||
>
|
||||
> One feature that user-defined networks do not support that you can do with
|
||||
|
@ -1383,7 +1383,7 @@ the alias, or the service name if no alias was specified.
|
|||
|
||||
Links are not required to enable services to communicate - by default,
|
||||
any service can reach any other service at that service’s name. (See also, the
|
||||
[Links topic in Networking in Compose](/compose/networking.md#links).)
|
||||
[Links topic in Networking in Compose](../networking.md#links).)
|
||||
|
||||
Links also express dependency between services in the same way as
|
||||
[depends_on](#depends_on), so they determine the order of service startup.
|
||||
|
@ -1397,7 +1397,7 @@ Links also express dependency between services in the same way as
|
|||
> Note when using docker stack deploy
|
||||
>
|
||||
> The `links` option is ignored when
|
||||
> [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md)
|
||||
> [deploying a stack in swarm mode](../../engine/reference/commandline/stack_deploy.md)
|
||||
{: .important }
|
||||
|
||||
### logging
|
||||
|
@ -1413,7 +1413,7 @@ logging:
|
|||
|
||||
The `driver` name specifies a logging driver for the service's
|
||||
containers, as with the ``--log-driver`` option for docker run
|
||||
([documented here](/config/containers/logging/configure.md)).
|
||||
([documented here](../../config/containers/logging/configure.md)).
|
||||
|
||||
The default value is json-file.
|
||||
|
||||
|
@ -1443,7 +1443,7 @@ options:
|
|||
syslog-address: "tcp://192.168.0.42:123"
|
||||
```
|
||||
|
||||
The default driver [json-file](/config/containers/logging/json-file.md), has options to limit the amount of logs stored. To do this, use a key-value pair for maximum storage size and maximum number of files:
|
||||
The default driver [json-file](../../config/containers/logging/json-file.md), has options to limit the amount of logs stored. To do this, use a key-value pair for maximum storage size and maximum number of files:
|
||||
|
||||
```yaml
|
||||
options:
|
||||
|
@ -1473,10 +1473,10 @@ services:
|
|||
> Logging options available depend on which logging driver you use
|
||||
>
|
||||
> The above example for controlling log files and sizes uses options
|
||||
> specific to the [json-file driver](/config/containers/logging/json-file.md).
|
||||
> specific to the [json-file driver](../../config/containers/logging/json-file.md).
|
||||
> These particular options are not available on other logging drivers.
|
||||
> For a full list of supported logging drivers and their options, refer to the
|
||||
> [logging drivers](/config/containers/logging/configure.md) documentation.
|
||||
> [logging drivers](../../config/containers/logging/configure.md) documentation.
|
||||
|
||||
### network_mode
|
||||
|
||||
|
@ -1502,7 +1502,7 @@ network_mode: "container:[container name/id]"
|
|||
> **Note**
|
||||
>
|
||||
> * This option is ignored when
|
||||
> [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md).
|
||||
> [deploying a stack in swarm mode](../../engine/reference/commandline/stack_deploy.md).
|
||||
> * `network_mode: "host"` cannot be mixed with [links](#links).
|
||||
{: .important }
|
||||
|
||||
|
@ -1696,7 +1696,7 @@ on-failure error.
|
|||
> Note when using docker stack deploy
|
||||
>
|
||||
> The `restart` option is ignored when
|
||||
> [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md).
|
||||
> [deploying a stack in swarm mode](../../engine/reference/commandline/stack_deploy.md).
|
||||
{: .important }
|
||||
|
||||
### secrets
|
||||
|
@ -1711,7 +1711,7 @@ configuration. Two different syntax variants are supported.
|
|||
> of the compose file, or stack deployment fails.
|
||||
{: .important }
|
||||
|
||||
For more information on secrets, see [secrets](/engine/swarm/secrets.md).
|
||||
For more information on secrets, see [secrets](../../engine/swarm/secrets.md).
|
||||
|
||||
#### Short syntax
|
||||
|
||||
|
@ -1807,7 +1807,7 @@ security_opt:
|
|||
> Note when using docker stack deploy
|
||||
>
|
||||
> The `security_opt` option is ignored when
|
||||
> [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md).
|
||||
> [deploying a stack in swarm mode](../../engine/reference/commandline/stack_deploy.md).
|
||||
{: .important }
|
||||
|
||||
### stop_grace_period
|
||||
|
@ -1858,12 +1858,12 @@ sysctls:
|
|||
You can only use sysctls that are namespaced in the kernel. Docker does not
|
||||
support changing sysctls inside a container that also modify the host system.
|
||||
For an overview of supported sysctls, refer to
|
||||
[configure namespaced kernel parameters (sysctls) at runtime](/engine/reference/commandline/run.md#configure-namespaced-kernel-parameters-sysctls-at-runtime).
|
||||
[configure namespaced kernel parameters (sysctls) at runtime](../../engine/reference/commandline/run.md#configure-namespaced-kernel-parameters-sysctls-at-runtime).
|
||||
|
||||
> Note when using docker stack deploy
|
||||
>
|
||||
> This option requires Docker Engine 19.03 or up when
|
||||
> [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md).
|
||||
> [deploying a stack in swarm mode](../../engine/reference/commandline/stack_deploy.md).
|
||||
|
||||
### tmpfs
|
||||
|
||||
|
@ -1884,7 +1884,7 @@ tmpfs:
|
|||
> Note when using docker stack deploy
|
||||
>
|
||||
> This option is ignored when
|
||||
> [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md)
|
||||
> [deploying a stack in swarm mode](../../engine/reference/commandline/stack_deploy.md)
|
||||
> with a (version 3-3.5) Compose file.
|
||||
|
||||
Mount a temporary file system inside the container. Size parameter specifies the size
|
||||
|
@ -1923,7 +1923,7 @@ more information.
|
|||
> Note when using docker stack deploy
|
||||
>
|
||||
> The `userns_mode` option is ignored when
|
||||
> [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md).
|
||||
> [deploying a stack in swarm mode](../../engine/reference/commandline/stack_deploy.md).
|
||||
{: .important }
|
||||
|
||||
### volumes
|
||||
|
@ -1979,7 +1979,7 @@ volumes:
|
|||
|
||||
> **Note**
|
||||
>
|
||||
> For general information on volumes, refer to the [use volumes](/storage/volumes.md)
|
||||
> For general information on volumes, refer to the [use volumes](../../storage/volumes.md)
|
||||
> and [volume plugins](/engine/extend/plugins_volume/) sections in the documentation.
|
||||
|
||||
|
||||
|
@ -2065,7 +2065,7 @@ volumes:
|
|||
> When creating bind mounts, using the long syntax requires the
|
||||
> referenced folder to be created beforehand. Using the short syntax
|
||||
> creates the folder on the fly if it doesn't exist.
|
||||
> See the [bind mounts documentation](/storage/bind-mounts.md#differences-between--v-and---mount-behavior)
|
||||
> See the [bind mounts documentation](../../storage/bind-mounts.md#differences-between--v-and---mount-behavior)
|
||||
> for more information.
|
||||
|
||||
#### Volumes for services, swarms, and stack files
|
||||
|
@ -2136,12 +2136,12 @@ services:
|
|||
|
||||
Full detail on these flags, the problems they solve, and their
|
||||
`docker run` counterparts is in the Docker Desktop for Mac topic
|
||||
[Performance tuning for volume mounts (shared filesystems)](/docker-for-mac/osxfs-caching.md).
|
||||
[Performance tuning for volume mounts (shared filesystems)](../../docker-for-mac/osxfs-caching.md).
|
||||
|
||||
### domainname, hostname, ipc, mac\_address, privileged, read\_only, shm\_size, stdin\_open, tty, user, working\_dir
|
||||
|
||||
Each of these is a single value, analogous to its
|
||||
[docker run](/engine/reference/run.md) counterpart. Note that `mac_address` is a legacy option.
|
||||
[docker run](../../engine/reference/run.md) counterpart. Note that `mac_address` is a legacy option.
|
||||
|
||||
```yaml
|
||||
user: postgresql
|
||||
|
@ -2196,10 +2196,10 @@ While it is possible to declare [volumes](#volumes) on the fly as part of the
|
|||
service declaration, this section allows you to create named volumes that can be
|
||||
reused across multiple services (without relying on `volumes_from`), and are
|
||||
easily retrieved and inspected using the docker command line or API.
|
||||
See the [docker volume](/engine/reference/commandline/volume_create.md)
|
||||
See the [docker volume](../../engine/reference/commandline/volume_create.md)
|
||||
subcommand documentation for more information.
|
||||
|
||||
See [use volumes](/storage/volumes.md) and [volume
|
||||
See [use volumes](../../storage/volumes.md) and [volume
|
||||
plugins](/engine/extend/plugins_volume/) for general information on volumes.
|
||||
|
||||
Here's an example of a two-service setup where a database's data directory is
|
||||
|
@ -2300,8 +2300,8 @@ volumes:
|
|||
> Note when using docker stack deploy
|
||||
>
|
||||
> External volumes that do not exist _are created_ if you use [docker stack deploy](#deploy)
|
||||
> to launch the app in [swarm mode](/engine/swarm/index.md) (instead of
|
||||
> [docker compose up](/compose/reference/up.md)). In swarm mode, a volume is
|
||||
> to launch the app in [swarm mode](../../engine/swarm/index.md) (instead of
|
||||
> [docker compose up](../reference/up.md)). In swarm mode, a volume is
|
||||
> automatically created when it is defined by a service. As service tasks are
|
||||
> scheduled on new nodes, [swarmkit](https://github.com/docker/swarmkit/blob/master/README.md)
|
||||
> creates the volume on the local node. To learn more, see [moby/moby#29976](https://github.com/moby/moby/issues/29976).
|
||||
|
@ -2310,7 +2310,7 @@ volumes:
|
|||
### labels
|
||||
|
||||
Add metadata to containers using
|
||||
[Docker labels](/config/labels-custom-metadata.md). You can use either
|
||||
[Docker labels](../../config/labels-custom-metadata.md). You can use either
|
||||
an array or a dictionary.
|
||||
|
||||
It's recommended that you use reverse-DNS notation to prevent your labels from
|
||||
|
@ -2360,7 +2360,7 @@ volumes:
|
|||
The top-level `networks` key lets you specify networks to be created.
|
||||
|
||||
* For a full explanation of Compose's use of Docker networking features and all
|
||||
network driver options, see the [Networking guide](/compose/networking.md).
|
||||
network driver options, see the [Networking guide](../networking.md).
|
||||
* For [Docker Labs](https://github.com/docker/labs/blob/master/README.md)
|
||||
tutorials on networking, start with [Designing Scalable, Portable Docker Container Networks](https://github.com/docker/labs/blob/master/networking/README.md)
|
||||
|
||||
|
@ -2387,7 +2387,7 @@ how to work with bridge networks, see the Docker Labs tutorial on
|
|||
#### overlay
|
||||
|
||||
The `overlay` driver creates a named network across multiple nodes in a
|
||||
[swarm](/engine/swarm/index.md).
|
||||
[swarm](../../engine/swarm/index.md).
|
||||
|
||||
* For a working example of how to build and use an
|
||||
`overlay` network with a service in swarm mode, see the Docker Labs tutorial on
|
||||
|
@ -2521,7 +2521,7 @@ you can set this option to `true`.
|
|||
### labels
|
||||
|
||||
Add metadata to containers using
|
||||
[Docker labels](/config/labels-custom-metadata.md). You can use either
|
||||
[Docker labels](../../config/labels-custom-metadata.md). You can use either
|
||||
an array or a dictionary.
|
||||
|
||||
It's recommended that you use reverse-DNS notation to prevent your labels from
|
||||
|
@ -2620,7 +2620,7 @@ networks:
|
|||
## configs configuration reference
|
||||
|
||||
The top-level `configs` declaration defines or references
|
||||
[configs](/engine/swarm/configs.md) that can be granted to the services in this
|
||||
[configs](../../engine/swarm/configs.md) that can be granted to the services in this
|
||||
stack. The source of the config is either `file` or `external`.
|
||||
|
||||
- `file`: The config is created with the contents of the file at the specified
|
||||
|
@ -2667,7 +2667,7 @@ stack.
|
|||
## secrets configuration reference
|
||||
|
||||
The top-level `secrets` declaration defines or references
|
||||
[secrets](/engine/swarm/secrets.md) that can be granted to the services in this
|
||||
[secrets](../../engine/swarm/secrets.md) that can be granted to the services in this
|
||||
stack. The source of the secret is either `file` or `external`.
|
||||
|
||||
- `file`: The secret is created with the contents of the file at the specified
|
||||
|
@ -2731,8 +2731,8 @@ stack.
|
|||
|
||||
## Compose documentation
|
||||
|
||||
- [User guide](/compose/index.md)
|
||||
- [Installing Compose](/compose/install.md)
|
||||
- [User guide](../index.md)
|
||||
- [Installing Compose](../install.md)
|
||||
- [Compose file versions and upgrading](compose-versioning.md)
|
||||
- [Samples](/samples/index.md)
|
||||
- [Command line reference](/compose/reference/index.md)
|
||||
- [Samples](../../samples/index.md)
|
||||
- [Command line reference](../reference/index.md)
|
||||
|
|
|
@ -20,7 +20,7 @@ and a `docker-compose.yml` file. (You can use either a `.yml` or `.yaml` extensi
|
|||
|
||||
The Dockerfile defines an application's image content via one or more build
|
||||
commands that configure that image. Once built, you can run the image in a
|
||||
container. For more information on `Dockerfile`, see the [Docker user guide](/get-started/index.md)
|
||||
container. For more information on `Dockerfile`, see the [Docker user guide](../get-started/index.md)
|
||||
and the [Dockerfile reference](/engine/reference/builder/).
|
||||
|
||||
3. Add the following content to the `Dockerfile`.
|
||||
|
@ -57,7 +57,7 @@ and a `docker-compose.yml` file. (You can use either a `.yml` or `.yaml` extensi
|
|||
also describes which Docker images these services use, how they link
|
||||
together, any volumes they might need mounted inside the containers.
|
||||
Finally, the `docker-compose.yml` file describes which ports these services
|
||||
expose. See the [`docker-compose.yml` reference](/compose/compose-file/index.md) for more
|
||||
expose. See the [`docker-compose.yml` reference](compose-file/index.md) for more
|
||||
information on how this file works.
|
||||
|
||||
9. Add the following configuration to the file.
|
||||
|
@ -94,7 +94,7 @@ In this step, you create a Django starter project by building the image from the
|
|||
1. Change to the root of your project directory.
|
||||
|
||||
2. Create the Django project by running
|
||||
the [docker-compose run](/compose/reference/run.md) command as follows.
|
||||
the [docker-compose run](reference/run.md) command as follows.
|
||||
|
||||
sudo docker-compose run web django-admin startproject composeexample .
|
||||
|
||||
|
@ -163,7 +163,7 @@ In this section, you set up the database connection for Django.
|
|||
|
||||
3. Save and close the file.
|
||||
|
||||
4. Run the [docker-compose up](/compose/reference/up.md) command from the top level directory for your project.
|
||||
4. Run the [docker-compose up](reference/up.md) command from the top level directory for your project.
|
||||
|
||||
```none
|
||||
$ docker-compose up
|
||||
|
@ -189,7 +189,7 @@ In this section, you set up the database connection for Django.
|
|||
At this point, your Django app should be running at port `8000` on
|
||||
your Docker host. On Docker Desktop for Mac and Docker Desktop for Windows, go
|
||||
to `http://localhost:8000` on a web browser to see the Django
|
||||
welcome page. If you are using [Docker Machine](/machine/overview.md),
|
||||
welcome page. If you are using [Docker Machine](../machine/overview.md),
|
||||
then `docker-machine ip MACHINE_VM` returns the Docker host IP
|
||||
address, to which you can append the port (`<Docker-Host-IP>:8000`).
|
||||
|
||||
|
@ -229,7 +229,7 @@ def85eff5f51 django_web "python3 manage.py..." 10 minutes ago
|
|||
Killing test_db_1 ... done
|
||||
```
|
||||
|
||||
* Or, for a more elegant shutdown, switch to a different shell, and run [docker-compose down](/compose/reference/down.md) from the top level of your Django sample project directory.
|
||||
* Or, for a more elegant shutdown, switch to a different shell, and run [docker-compose down](reference/down.md) from the top level of your Django sample project directory.
|
||||
|
||||
```none
|
||||
vmb at mymachine in ~/sandbox/django
|
||||
|
@ -251,5 +251,5 @@ def85eff5f51 django_web "python3 manage.py..." 10 minutes ago
|
|||
- [Getting Started](gettingstarted.md)
|
||||
- [Get started with Rails](rails.md)
|
||||
- [Get started with WordPress](wordpress.md)
|
||||
- [Command line reference](/compose/reference/index.md)
|
||||
- [Compose file reference](/compose/compose-file/index.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
|
|
|
@ -21,9 +21,9 @@ These syntax rules apply to the `.env` file:
|
|||
## Compose file and CLI variables
|
||||
|
||||
The environment variables you define here are used for
|
||||
[variable substitution](/compose/compose-file/index.md#variable-substitution)
|
||||
[variable substitution](compose-file/index.md#variable-substitution)
|
||||
in your Compose file, and can also be used to define the following
|
||||
[CLI variables](/compose/reference/envvars.md):
|
||||
[CLI variables](reference/envvars.md):
|
||||
|
||||
- `COMPOSE_API_VERSION`
|
||||
- `COMPOSE_CONVERT_WINDOWS_PATHS`
|
||||
|
@ -43,12 +43,12 @@ in your Compose file, and can also be used to define the following
|
|||
> * Environment variables defined in the `.env` file are not automatically
|
||||
> visible inside containers. To set container-applicable environment variables,
|
||||
> follow the guidelines in the topic
|
||||
> [Environment variables in Compose](/compose/environment-variables.md), which
|
||||
> [Environment variables in Compose](environment-variables.md), which
|
||||
> describes how to pass shell environment variables through to containers,
|
||||
> define environment variables in Compose files, and more.
|
||||
|
||||
## More Compose documentation
|
||||
|
||||
- [User guide](index.md)
|
||||
- [Command line reference](/compose/reference/index.md)
|
||||
- [Compose file reference](/compose/compose-file/index.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
|
|
|
@ -19,14 +19,14 @@ web:
|
|||
```
|
||||
|
||||
For more information, see the
|
||||
[Variable substitution](/compose/compose-file/index.md#variable-substitution) section in the
|
||||
[Variable substitution](compose-file/index.md#variable-substitution) section in the
|
||||
Compose file reference.
|
||||
|
||||
|
||||
## Set environment variables in containers
|
||||
|
||||
You can set environment variables in a service's containers with the
|
||||
['environment' key](/compose/compose-file/index.md#environment), just like with
|
||||
['environment' key](compose-file/index.md#environment), just like with
|
||||
`docker run -e VARIABLE=VALUE ...`:
|
||||
|
||||
```yaml
|
||||
|
@ -38,7 +38,7 @@ web:
|
|||
## Pass environment variables to containers
|
||||
|
||||
You can pass environment variables from your shell straight through to a
|
||||
service's containers with the ['environment' key](/compose/compose-file/index.md#environment)
|
||||
service's containers with the ['environment' key](compose-file/index.md#environment)
|
||||
by not giving them a value, just like with `docker run -e VARIABLE ...`:
|
||||
|
||||
```yaml
|
||||
|
@ -53,7 +53,7 @@ the same variable in the shell in which Compose is run.
|
|||
## The “env_file” configuration option
|
||||
|
||||
You can pass multiple environment variables from an external file through to
|
||||
a service's containers with the ['env_file' option](/compose/compose-file/index.md#env_file),
|
||||
a service's containers with the ['env_file' option](compose-file/index.md#env_file),
|
||||
just like with `docker run --env-file=FILE ...`:
|
||||
|
||||
```yaml
|
||||
|
@ -180,8 +180,8 @@ documented in [CLI Environment Variables](reference/envvars.md).
|
|||
|
||||
## Environment variables created by links
|
||||
|
||||
When using the ['links' option](/compose/compose-file/index.md#links) in a
|
||||
[v1 Compose file](/compose/compose-file/index.md#version-1), environment variables are created
|
||||
When using the ['links' option](compose-file/index.md#links) in a
|
||||
[v1 Compose file](compose-file/index.md#version-1), environment variables are created
|
||||
for each link. They are documented in
|
||||
the [Link environment variables reference](link-env-deprecated.md).
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ the rules described in
|
|||
To use multiple override files, or an override file with a different name, you
|
||||
can use the `-f` option to specify the list of files. Compose merges files in
|
||||
the order they're specified on the command line. See the
|
||||
[`docker-compose` command reference](/compose/reference/overview.md) for more information
|
||||
[`docker-compose` command reference](reference/overview.md) for more information
|
||||
about using `-f`.
|
||||
|
||||
When you use multiple configuration files, you must make sure all paths in the
|
||||
|
@ -162,10 +162,10 @@ backup, include the `docker-compose.admin.yml` as well.
|
|||
> **Note**
|
||||
>
|
||||
> The `extends` keyword is supported in earlier Compose file formats up to Compose
|
||||
> file version 2.1 (see [extends in v1](/compose/compose-file/compose-file-v1.md#extends)
|
||||
> and [extends in v2](/compose/compose-file/compose-file-v2.md#extends)), but is
|
||||
> not supported in Compose version 3.x. See the [Version 3 summary](/compose/compose-file/compose-versioning.md#version-3)
|
||||
> of keys added and removed, along with information on [how to upgrade](/compose/compose-file/compose-versioning.md#upgrading).
|
||||
> file version 2.1 (see [extends in v1](compose-file/compose-file-v1.md#extends)
|
||||
> and [extends in v2](compose-file/compose-file-v2.md#extends)), but is
|
||||
> not supported in Compose version 3.x. See the [Version 3 summary](compose-file/compose-versioning.md#version-3)
|
||||
> of keys added and removed, along with information on [how to upgrade](compose-file/compose-versioning.md#upgrading).
|
||||
> See [moby/moby#31101](https://github.com/moby/moby/issues/31101) to follow the
|
||||
> discussion thread on possibility of adding support for `extends` in some form in
|
||||
> future versions.
|
||||
|
@ -296,7 +296,7 @@ replaces the old value.
|
|||
> `build` and `image` in Compose file version 1
|
||||
>
|
||||
> In the case of `build` and `image`, when using
|
||||
> [version 1 of the Compose file format](/compose/compose-file/compose-file-v1.md), using one
|
||||
> [version 1 of the Compose file format](compose-file/compose-file-v1.md), using one
|
||||
> option in the local service causes Compose to discard the other option if it
|
||||
> was defined in the original service.
|
||||
>
|
||||
|
@ -375,5 +375,5 @@ container:
|
|||
- [Get started with Django](django.md)
|
||||
- [Get started with Rails](rails.md)
|
||||
- [Get started with WordPress](wordpress.md)
|
||||
- [Command line reference](/compose/reference/index.md)
|
||||
- [Compose file reference](/compose/compose-file/index.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
|
|
|
@ -16,7 +16,7 @@ Yes - see [Controlling startup order](startup-order.md).
|
|||
## Why do my services take 10 seconds to recreate or stop?
|
||||
|
||||
Compose stop attempts to stop a container by sending a `SIGTERM`. It then waits
|
||||
for a [default timeout of 10 seconds](/compose/reference/stop.md). After the timeout,
|
||||
for a [default timeout of 10 seconds](reference/stop.md). After the timeout,
|
||||
a `SIGKILL` is sent to the container to forcefully kill it. If you
|
||||
are waiting for this timeout, it means that your containers aren't shutting down
|
||||
when they receive the `SIGTERM` signal.
|
||||
|
@ -54,8 +54,8 @@ handling `SIGTERM` properly.
|
|||
|
||||
Compose uses the project name to create unique identifiers for all of a
|
||||
project's containers and other resources. To run multiple copies of a project,
|
||||
set a custom project name using the [`-p` command line option](/compose/reference/overview.md)
|
||||
or the [`COMPOSE_PROJECT_NAME` environment variable](/compose/reference/envvars.md#compose_project_name).
|
||||
set a custom project name using the [`-p` command line option](reference/overview.md)
|
||||
or the [`COMPOSE_PROJECT_NAME` environment variable](reference/envvars.md#compose_project_name).
|
||||
|
||||
## What's the difference between `up`, `run`, and `start`?
|
||||
|
||||
|
@ -115,5 +115,5 @@ github](https://github.com/search?q=in%3Apath+docker-compose.yml+extension%3Ayml
|
|||
- [Get started with Django](django.md)
|
||||
- [Get started with Rails](rails.md)
|
||||
- [Get started with WordPress](wordpress.md)
|
||||
- [Command line reference](/compose/reference/index.md)
|
||||
- [Compose file reference](/compose/compose-file/index.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
|
|
|
@ -11,7 +11,7 @@ understandable even if you're not familiar with it.
|
|||
|
||||
## Prerequisites
|
||||
|
||||
Make sure you have already installed both [Docker Engine](/get-docker.md)
|
||||
Make sure you have already installed both [Docker Engine](../get-docker.md)
|
||||
and [Docker Compose](install.md). You don't need to install Python or Redis, as
|
||||
both are provided by Docker images.
|
||||
|
||||
|
@ -103,7 +103,7 @@ This tells Docker to:
|
|||
* Set the default command for the container to `flask run`.
|
||||
|
||||
For more information on how to write Dockerfiles, see the
|
||||
[Docker user guide](/develop/index.md)
|
||||
[Docker user guide](../develop/index.md)
|
||||
and the [Dockerfile reference](/engine/reference/builder/).
|
||||
|
||||
|
||||
|
@ -215,7 +215,7 @@ hitting CTRL+C in the original terminal where you started the app.
|
|||
## Step 5: Edit the Compose file to add a bind mount
|
||||
|
||||
Edit `docker-compose.yml` in your project directory to add a
|
||||
[bind mount](/storage/bind-mounts.md) for the `web` service:
|
||||
[bind mount](../storage/bind-mounts.md) for the `web` service:
|
||||
|
||||
version: '3'
|
||||
services:
|
||||
|
@ -263,14 +263,14 @@ If you get runtime errors indicating an application file is not found, a volume
|
|||
mount is denied, or a service cannot start, try enabling file or drive sharing.
|
||||
Volume mounting requires shared drives for projects that live outside of
|
||||
`C:\Users` (Windows) or `/Users` (Mac), and is required for _any_ project on
|
||||
Docker Desktop for Windows that uses [Linux containers](/docker-for-windows/index.md#switch-between-windows-and-linux-containers).
|
||||
For more information, see [File sharing](/docker-for-mac/index.md#file-sharing) on Docker
|
||||
Docker Desktop for Windows that uses [Linux containers](../docker-for-windows/index.md#switch-between-windows-and-linux-containers).
|
||||
For more information, see [File sharing](../docker-for-mac/index.md#file-sharing) on Docker
|
||||
for Mac, and the general examples on how to
|
||||
> [Manage data in containers](/storage/volumes.md).
|
||||
> [Manage data in containers](../storage/volumes.md).
|
||||
>
|
||||
> * If you are using Oracle VirtualBox on an older Windows OS, you might encounter an issue with shared folders as described in this [VB trouble
|
||||
ticket](https://www.virtualbox.org/ticket/14920). Newer Windows systems meet the
|
||||
requirements for [Docker Desktop for Windows](/docker-for-windows/install.md) and do not
|
||||
requirements for [Docker Desktop for Windows](../docker-for-windows/install.md) and do not
|
||||
need VirtualBox.
|
||||
{: .important}
|
||||
|
||||
|
@ -333,6 +333,6 @@ At this point, you have seen the basics of how Compose works.
|
|||
|
||||
- Next, try the quick start guide for [Django](django.md),
|
||||
[Rails](rails.md), or [WordPress](wordpress.md)
|
||||
- [Explore the full list of Compose commands](/compose/reference/index.md)
|
||||
- [Compose configuration file reference](/compose/compose-file/index.md)
|
||||
- To learn more about volumes and bind mounts, see [Manage data in Docker](/storage/index.md)
|
||||
- [Explore the full list of Compose commands](reference/index.md)
|
||||
- [Compose configuration file reference](compose-file/index.md)
|
||||
- To learn more about volumes and bind mounts, see [Manage data in Docker](../storage/index.md)
|
||||
|
|
|
@ -6,7 +6,7 @@ redirect_from:
|
|||
- /compose/overview/
|
||||
---
|
||||
|
||||
>**Looking for Compose file reference?** [Find the latest version here](/compose/compose-file/index.md).
|
||||
>**Looking for Compose file reference?** [Find the latest version here](compose-file/index.md).
|
||||
|
||||
Compose is a tool for defining and running multi-container Docker applications.
|
||||
With Compose, you use a YAML file to configure your application's services.
|
||||
|
@ -47,7 +47,7 @@ A `docker-compose.yml` looks like this:
|
|||
logvolume01: {}
|
||||
|
||||
For more information about the Compose file, see the
|
||||
[Compose file reference](/compose/compose-file/index.md).
|
||||
[Compose file reference](compose-file/index.md).
|
||||
|
||||
Compose has commands for managing the whole lifecycle of your application:
|
||||
|
||||
|
@ -64,8 +64,8 @@ Compose has commands for managing the whole lifecycle of your application:
|
|||
- [Get started with Rails](rails.md)
|
||||
- [Get started with WordPress](wordpress.md)
|
||||
- [Frequently asked questions](faq.md)
|
||||
- [Command line reference](/compose/reference/index.md)
|
||||
- [Compose file reference](/compose/compose-file/index.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
|
||||
## Features
|
||||
|
||||
|
@ -88,8 +88,8 @@ Compose uses a project name to isolate environments from each other. You can mak
|
|||
|
||||
The default project name is the basename of the project directory. You can set
|
||||
a custom project name by using the
|
||||
[`-p` command line option](/compose/reference/overview.md) or the
|
||||
[`COMPOSE_PROJECT_NAME` environment variable](/compose/reference/envvars.md#compose_project_name).
|
||||
[`-p` command line option](reference/overview.md) or the
|
||||
[`COMPOSE_PROJECT_NAME` environment variable](reference/envvars.md#compose_project_name).
|
||||
|
||||
### Preserve volume data when containers are created
|
||||
|
||||
|
@ -99,7 +99,7 @@ the old container to the new container. This process ensures that any data
|
|||
you've created in volumes isn't lost.
|
||||
|
||||
If you use `docker-compose` on a Windows machine, see
|
||||
[Environment variables](/compose/reference/envvars.md) and adjust the necessary environment
|
||||
[Environment variables](reference/envvars.md) and adjust the necessary environment
|
||||
variables for your specific needs.
|
||||
|
||||
|
||||
|
@ -115,7 +115,7 @@ environment very quickly.
|
|||
|
||||
Compose supports variables in the Compose file. You can use these variables
|
||||
to customize your composition for different environments, or different users.
|
||||
See [Variable substitution](/compose/compose-file/index.md#variable-substitution) for more
|
||||
See [Variable substitution](compose-file/index.md#variable-substitution) for more
|
||||
details.
|
||||
|
||||
You can extend a Compose file using the `extends` field or by creating multiple
|
||||
|
@ -133,7 +133,7 @@ When you're developing software, the ability to run an application in an
|
|||
isolated environment and interact with it is crucial. The Compose command
|
||||
line tool can be used to create the environment and interact with it.
|
||||
|
||||
The [Compose file](/compose/compose-file/index.md) provides a way to document and configure
|
||||
The [Compose file](compose-file/index.md) provides a way to document and configure
|
||||
all of the application's service dependencies (databases, queues, caches,
|
||||
web service APIs, etc). Using the Compose command line tool you can create
|
||||
and start one or more containers for each dependency with a single command
|
||||
|
@ -148,7 +148,7 @@ started guide" to a single machine readable Compose file and a few commands.
|
|||
An important part of any Continuous Deployment or Continuous Integration process
|
||||
is the automated test suite. Automated end-to-end testing requires an
|
||||
environment in which to run tests. Compose provides a convenient way to create
|
||||
and destroy isolated testing environments for your test suite. By defining the full environment in a [Compose file](/compose/compose-file/index.md), you can create and destroy these environments in just a few commands:
|
||||
and destroy isolated testing environments for your test suite. By defining the full environment in a [Compose file](compose-file/index.md), you can create and destroy these environments in just a few commands:
|
||||
|
||||
$ docker-compose up -d
|
||||
$ ./run_tests
|
||||
|
@ -158,8 +158,8 @@ and destroy isolated testing environments for your test suite. By defining the f
|
|||
|
||||
Compose has traditionally been focused on development and testing workflows,
|
||||
but with each release we're making progress on more production-oriented features. You can use Compose to deploy to a remote Docker Engine. The Docker Engine may be a single instance provisioned with
|
||||
[Docker Machine](/machine/overview.md) or an entire
|
||||
[Docker Swarm](/engine/swarm/index.md) cluster.
|
||||
[Docker Machine](../machine/overview.md) or an entire
|
||||
[Docker Swarm](../engine/swarm/index.md) cluster.
|
||||
|
||||
For details on using production-oriented features, see
|
||||
[compose in production](production.md) in this documentation.
|
||||
|
|
|
@ -16,12 +16,12 @@ have Docker Engine installed either locally or remote, depending on your setup.
|
|||
included as part of those desktop installs.
|
||||
|
||||
- On Linux systems, first install the
|
||||
[Docker Engine](/engine/install/index.md#server){: target="_blank" class="_"}
|
||||
[Docker Engine](../engine/install/index.md#server){: target="_blank" class="_"}
|
||||
for your OS as described on the Get Docker page, then come back here for
|
||||
instructions on installing Compose on
|
||||
Linux systems.
|
||||
|
||||
- To run Compose as a non-root user, see [Manage Docker as a non-root user](/engine/install/linux-postinstall.md).
|
||||
- To run Compose as a non-root user, see [Manage Docker as a non-root user](../engine/install/linux-postinstall.md).
|
||||
|
||||
## Install Compose
|
||||
|
||||
|
@ -55,8 +55,8 @@ Python package manager or installing Compose as a container.
|
|||
with other Docker apps, so Mac users do not need to install Compose separately.
|
||||
Docker install instructions for these are here:
|
||||
|
||||
* [Get Docker Desktop for Mac](/docker-for-mac/install.md)
|
||||
* [Get Docker Toolbox](/toolbox/overview.md) (for older systems)
|
||||
* [Get Docker Desktop for Mac](../docker-for-mac/install.md)
|
||||
* [Get Docker Toolbox](../toolbox/overview.md) (for older systems)
|
||||
|
||||
</div>
|
||||
<div id="windows" class="tab-pane fade" markdown="1">
|
||||
|
@ -67,8 +67,8 @@ Docker install instructions for these are here:
|
|||
along with other Docker apps, so most Windows users do not need to
|
||||
install Compose separately. Docker install instructions for these are here:
|
||||
|
||||
* [Get Docker Desktop for Windows](/docker-for-windows/install.md)
|
||||
* [Get Docker Toolbox](/toolbox/overview.md) (for older systems)
|
||||
* [Get Docker Desktop for Windows](../docker-for-windows/install.md)
|
||||
* [Get Docker Toolbox](../toolbox/overview.md) (for older systems)
|
||||
|
||||
If you are running the Docker daemon and client directly on Microsoft
|
||||
Windows Server, follow the instructions in the Windows Server tab.
|
||||
|
@ -79,8 +79,7 @@ Windows Server, follow the instructions in the Windows Server tab.
|
|||
### Install Compose on Windows Server
|
||||
|
||||
Follow these instructions if you are running the Docker daemon and client directly
|
||||
on Microsoft Windows Server with [Docker Engine - Enterprise](/ee/docker-ee/windows/docker-ee.md),
|
||||
and want to install Docker Compose.
|
||||
on Microsoft Windows Server and want to install Docker Compose.
|
||||
|
||||
|
||||
1. Start an "elevated" PowerShell (run it as administrator).
|
||||
|
@ -282,5 +281,5 @@ pip uninstall docker-compose
|
|||
- [Get started with Django](django.md)
|
||||
- [Get started with Rails](rails.md)
|
||||
- [Get started with WordPress](wordpress.md)
|
||||
- [Command line reference](/compose/reference/index.md)
|
||||
- [Compose file reference](/compose/compose-file/index.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
|
|
|
@ -7,11 +7,11 @@ title: Link environment variables (superseded)
|
|||
notoc: true
|
||||
---
|
||||
|
||||
> **Note**: Environment variables are no longer the recommended method for connecting to linked services. Instead, you should use the link name (by default, the name of the linked service) as the hostname to connect to. See the [docker-compose.yml documentation](/compose/compose-file/#links) for details.
|
||||
> **Note**: Environment variables are no longer the recommended method for connecting to linked services. Instead, you should use the link name (by default, the name of the linked service) as the hostname to connect to. See the [docker-compose.yml documentation](compose-file/#links) for details.
|
||||
>
|
||||
> Environment variables are only populated if you're using the [legacy version 1 Compose file format](/compose/compose-file/compose-versioning.md#versioning).
|
||||
> Environment variables are only populated if you're using the [legacy version 1 Compose file format](compose-file/compose-versioning.md#versioning).
|
||||
|
||||
Compose uses [Docker links](/network/links.md)
|
||||
Compose uses [Docker links](../network/links.md)
|
||||
to expose services' containers to one another. Each linked container injects a set of
|
||||
environment variables, each of which begins with the uppercase name of the container.
|
||||
|
||||
|
@ -39,5 +39,5 @@ Fully qualified container name, such as `DB_1_NAME=/myapp_web_1/myapp_db_1`
|
|||
|
||||
- [User guide](index.md)
|
||||
- [Installing Compose](install.md)
|
||||
- [Command line reference](/compose/reference/index.md)
|
||||
- [Compose file reference](/compose/compose-file/index.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
|
|
|
@ -4,18 +4,18 @@ keywords: documentation, docs, docker, compose, orchestration, containers, netwo
|
|||
title: Networking in Compose
|
||||
---
|
||||
|
||||
> This page applies to Compose file formats [version 2](/compose/compose-file/compose-file-v2.md) and [higher](/compose/compose-file/index.md). Networking features are not supported for Compose file [version 1 (legacy)](/compose/compose-file/compose-file-v1.md).
|
||||
> This page applies to Compose file formats [version 2](compose-file/compose-file-v2.md) and [higher](compose-file/index.md). Networking features are not supported for Compose file [version 1 (legacy)](compose-file/compose-file-v1.md).
|
||||
|
||||
By default Compose sets up a single
|
||||
[network](/engine/reference/commandline/network_create.md) for your app. Each
|
||||
[network](../engine/reference/commandline/network_create.md) for your app. Each
|
||||
container for a service joins the default network and is both *reachable* by
|
||||
other containers on that network, and *discoverable* by them at a hostname
|
||||
identical to the container name.
|
||||
|
||||
> **Note**: Your app's network is given a name based on the "project name",
|
||||
> which is based on the name of the directory it lives in. You can override the
|
||||
> project name with either the [`--project-name` flag](/compose/reference/overview.md)
|
||||
> or the [`COMPOSE_PROJECT_NAME` environment variable](/compose/reference/envvars.md#compose_project_name).
|
||||
> project name with either the [`--project-name` flag](reference/overview.md)
|
||||
> or the [`COMPOSE_PROJECT_NAME` environment variable](reference/envvars.md#compose_project_name).
|
||||
|
||||
For example, suppose your app is in a directory called `myapp`, and your `docker-compose.yml` looks like this:
|
||||
|
||||
|
@ -82,15 +82,15 @@ Links allow you to define extra aliases by which a service is reachable from ano
|
|||
db:
|
||||
image: postgres
|
||||
|
||||
See the [links reference](/compose/compose-file/compose-file-v2.md#links) for more information.
|
||||
See the [links reference](compose-file/compose-file-v2.md#links) for more information.
|
||||
|
||||
## Multi-host networking
|
||||
|
||||
> **Note**: The instructions in this section refer to [legacy Docker Swarm](swarm.md) operations, and only work when targeting a legacy Swarm cluster. For instructions on deploying a compose project to the newer integrated swarm mode, consult the [Docker Stacks](/engine/reference/commandline/stack_deploy.md) documentation.
|
||||
> **Note**: The instructions in this section refer to [legacy Docker Swarm](swarm.md) operations, and only work when targeting a legacy Swarm cluster. For instructions on deploying a compose project to the newer integrated swarm mode, consult the [Docker Stacks](../engine/reference/commandline/stack_deploy.md) documentation.
|
||||
|
||||
When [deploying a Compose application to a Swarm cluster](swarm.md), you can make use of the built-in `overlay` driver to enable multi-host communication between containers with no changes to your Compose file or application code.
|
||||
|
||||
Consult the [Getting started with multi-host networking](/network/network-tutorial-overlay.md) to see how to set up a Swarm cluster. The cluster uses the `overlay` driver by default, but you can specify it explicitly if you prefer - see below for how to do this.
|
||||
Consult the [Getting started with multi-host networking](../network/network-tutorial-overlay.md) to see how to set up a Swarm cluster. The cluster uses the `overlay` driver by default, but you can specify it explicitly if you prefer - see below for how to do this.
|
||||
|
||||
## Specify custom networks
|
||||
|
||||
|
@ -128,9 +128,9 @@ Here's an example Compose file defining two custom networks. The `proxy` service
|
|||
foo: "1"
|
||||
bar: "2"
|
||||
|
||||
Networks can be configured with static IP addresses by setting the [ipv4_address and/or ipv6_address](/compose/compose-file/compose-file-v2.md#ipv4_address-ipv6_address) for each attached network.
|
||||
Networks can be configured with static IP addresses by setting the [ipv4_address and/or ipv6_address](compose-file/compose-file-v2.md#ipv4_address-ipv6_address) for each attached network.
|
||||
|
||||
Networks can also be given a [custom name](/compose/compose-file/index.md#network-configuration-reference) (since version 3.5):
|
||||
Networks can also be given a [custom name](compose-file/index.md#network-configuration-reference) (since version 3.5):
|
||||
|
||||
version: "3.5"
|
||||
networks:
|
||||
|
@ -140,8 +140,8 @@ Networks can also be given a [custom name](/compose/compose-file/index.md#networ
|
|||
|
||||
For full details of the network configuration options available, see the following references:
|
||||
|
||||
- [Top-level `networks` key](/compose/compose-file/compose-file-v2.md#network-configuration-reference)
|
||||
- [Service-level `networks` key](/compose/compose-file/compose-file-v2.md#networks)
|
||||
- [Top-level `networks` key](compose-file/compose-file-v2.md#network-configuration-reference)
|
||||
- [Service-level `networks` key](compose-file/compose-file-v2.md#networks)
|
||||
|
||||
## Configure the default network
|
||||
|
||||
|
@ -164,7 +164,7 @@ Instead of (or as well as) specifying your own networks, you can also change the
|
|||
|
||||
## Use a pre-existing network
|
||||
|
||||
If you want your containers to join a pre-existing network, use the [`external` option](/compose/compose-file/compose-file-v2.md#network-configuration-reference):
|
||||
If you want your containers to join a pre-existing network, use the [`external` option](compose-file/compose-file-v2.md#network-configuration-reference):
|
||||
|
||||
networks:
|
||||
default:
|
||||
|
|
|
@ -57,7 +57,7 @@ recreating any services which `web` depends on.
|
|||
You can use Compose to deploy an app to a remote Docker host by setting the
|
||||
`DOCKER_HOST`, `DOCKER_TLS_VERIFY`, and `DOCKER_CERT_PATH` environment variables
|
||||
appropriately. For tasks like this,
|
||||
[Docker Machine](/machine/overview.md) makes managing local and
|
||||
[Docker Machine](../machine/overview.md) makes managing local and
|
||||
remote Docker hosts very easy, and is recommended even if you're not deploying
|
||||
remotely.
|
||||
|
||||
|
@ -66,7 +66,7 @@ commands work with no further configuration.
|
|||
|
||||
### Running Compose on a Swarm cluster
|
||||
|
||||
[Docker Swarm](/swarm/overview.md), a Docker-native clustering
|
||||
[Docker Swarm](../swarm/overview.md), a Docker-native clustering
|
||||
system, exposes the same API as a single Docker host, which means you can use
|
||||
Compose against a Swarm instance and run your apps across multiple hosts.
|
||||
|
||||
|
@ -76,5 +76,5 @@ Read more about the Compose/Swarm integration in the
|
|||
## Compose documentation
|
||||
|
||||
- [Installing Compose](install.md)
|
||||
- [Command line reference](/compose/reference/index.md)
|
||||
- [Compose file reference](/compose/compose-file/index.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
|
|
|
@ -33,7 +33,7 @@ Dockerfile consists of:
|
|||
|
||||
That'll put your application code inside an image that builds a container
|
||||
with Ruby, Bundler and all your dependencies inside it. For more information on
|
||||
how to write Dockerfiles, see the [Docker user guide](/get-started/index.md)
|
||||
how to write Dockerfiles, see the [Docker user guide](../get-started/index.md)
|
||||
and the [Dockerfile reference](/engine/reference/builder/).
|
||||
|
||||
Next, create a bootstrap `Gemfile` which just loads Rails. It'll be overwritten
|
||||
|
@ -89,7 +89,7 @@ to link them together and expose the web app's port.
|
|||
### Build the project
|
||||
|
||||
With those files in place, you can now generate the Rails skeleton app
|
||||
using [docker-compose run](/compose/reference/run.md):
|
||||
using [docker-compose run](reference/run.md):
|
||||
|
||||
docker-compose run web rails new . --force --no-deps --database=postgresql
|
||||
|
||||
|
@ -169,7 +169,7 @@ test:
|
|||
database: myapp_test
|
||||
```
|
||||
|
||||
You can now boot the app with [docker-compose up](/compose/reference/up.md):
|
||||
You can now boot the app with [docker-compose up](reference/up.md):
|
||||
|
||||
docker-compose up
|
||||
|
||||
|
@ -209,7 +209,7 @@ That's it. Your app should now be running on port 3000 on your Docker daemon.
|
|||
On Docker Desktop for Mac and Docker Desktop for Windows, go to `http://localhost:3000` on a web
|
||||
browser to see the Rails Welcome.
|
||||
|
||||
If you are using [Docker Machine](/machine/overview.md), then `docker-machine ip
|
||||
If you are using [Docker Machine](../machine/overview.md), then `docker-machine ip
|
||||
MACHINE_VM` returns the Docker host IP address, to which you can append the port
|
||||
(`<Docker-Host-IP>:3000`).
|
||||
|
||||
|
@ -217,7 +217,7 @@ MACHINE_VM` returns the Docker host IP address, to which you can append the port
|
|||
|
||||
### Stop the application
|
||||
|
||||
To stop the application, run [docker-compose down](/compose/reference/down.md) in
|
||||
To stop the application, run [docker-compose down](reference/down.md) in
|
||||
your project directory. You can use the same terminal window in which you
|
||||
started the database, or another one where you have access to a command prompt.
|
||||
This is a clean way to stop the application.
|
||||
|
@ -269,5 +269,5 @@ host.
|
|||
- [Getting Started](gettingstarted.md)
|
||||
- [Get started with Django](django.md)
|
||||
- [Get started with WordPress](wordpress.md)
|
||||
- [Command line reference](/compose/reference/index.md)
|
||||
- [Compose file reference](/compose/compose-file/index.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
|
|
|
@ -21,9 +21,9 @@ Options:
|
|||
|
||||
Services are built once and then tagged, by default as `project_service`. For
|
||||
example, `composetest_db`. If the Compose file specifies an
|
||||
[image](/compose/compose-file/index.md#image) name, the image is
|
||||
[image](../compose-file/index.md#image) name, the image is
|
||||
tagged with that name, substituting any variables beforehand. See
|
||||
[variable substitution](/compose/compose-file/index.md#variable-substitution).
|
||||
[variable substitution](../compose-file/index.md#variable-substitution).
|
||||
|
||||
If you change a service's Dockerfile or the contents of its
|
||||
build directory, run `docker-compose build` to rebuild it.
|
||||
|
|
|
@ -10,7 +10,7 @@ Variables starting with `DOCKER_` are the same as those used to configure the
|
|||
Docker command-line client. If you're using `docker-machine`, then the `eval "$(docker-machine env my-docker-vm)"` command should set them to their correct values. (In this example, `my-docker-vm` is the name of a machine you created.)
|
||||
|
||||
> **Note**: Some of these variables can also be provided using an
|
||||
> [environment file](/compose/env-file.md).
|
||||
> [environment file](../env-file.md).
|
||||
|
||||
## COMPOSE\_PROJECT\_NAME
|
||||
|
||||
|
@ -93,7 +93,7 @@ using this character as path separator.
|
|||
|
||||
## COMPOSE\_FORCE\_WINDOWS\_HOST
|
||||
|
||||
If set, volume declarations using the [short syntax](/compose/compose-file/#short-syntax-3)
|
||||
If set, volume declarations using the [short syntax](../compose-file/#short-syntax-3)
|
||||
are parsed assuming the host path is a Windows path, even if Compose is
|
||||
running on a UNIX-based system.
|
||||
Supported values: `true` or `1` to enable, `false` or `0` to disable.
|
||||
|
@ -117,7 +117,7 @@ Supported: `true` or `1` to enable, `false` or `0` to disable.
|
|||
|
||||
## Related information
|
||||
|
||||
- [User guide](/compose/index.md)
|
||||
- [Installing Compose](/compose/install.md)
|
||||
- [Compose file reference](/compose/compose-file/index.md)
|
||||
- [Environment file](/compose/env-file.md)
|
||||
- [User guide](../index.md)
|
||||
- [Installing Compose](../install.md)
|
||||
- [Compose file reference](../compose-file/index.md)
|
||||
- [Environment file](../env-file.md)
|
||||
|
|
|
@ -31,4 +31,4 @@ format:
|
|||
}
|
||||
```
|
||||
|
||||
The events that can be received using this can be seen [here](/engine/reference/commandline/events.md#object-types).
|
||||
The events that can be received using this can be seen [here](../../engine/reference/commandline/events.md#object-types).
|
||||
|
|
|
@ -135,7 +135,7 @@ a [COMPOSE_FILE environment variable](envvars.md#compose_file) in your shell or
|
|||
in an environment file.
|
||||
|
||||
For an example of using the `-f` option at the command line, suppose you are
|
||||
running the [Compose Rails sample](/compose/rails.md), and
|
||||
running the [Compose Rails sample](../rails.md), and
|
||||
have a `docker-compose.yml` file in a directory called `sandbox/rails`. You can
|
||||
use a command like [docker-compose pull](pull.md) to get the
|
||||
postgres image for the `db` service from anywhere by using the `-f` flag as
|
||||
|
@ -179,9 +179,9 @@ For example, the [COMPOSE_FILE environment variable](envvars.md#compose_file)
|
|||
relates to the `-f` flag, and `COMPOSE_PROJECT_NAME`
|
||||
[environment variable](envvars.md#compose_project_name) relates to the `-p` flag.
|
||||
|
||||
Also, you can set some of these variables in an [environment file](/compose/env-file.md).
|
||||
Also, you can set some of these variables in an [environment file](../env-file.md).
|
||||
|
||||
## Where to go next
|
||||
|
||||
* [CLI environment variables](envvars.md)
|
||||
* [Declare default environment variables in file](/compose/env-file.md)
|
||||
* [Declare default environment variables in file](../env-file.md)
|
||||
|
|
|
@ -18,7 +18,7 @@ Options:
|
|||
|
||||
Pulls an image associated with a service defined in a `docker-compose.yml` or `docker-stack.yml` file, but does not start containers based on those images.
|
||||
|
||||
For example, suppose you have this `docker-compose.yml` file from the [Quickstart: Compose and Rails](/compose/rails.md) sample.
|
||||
For example, suppose you have this `docker-compose.yml` file from the [Quickstart: Compose and Rails](../rails.md) sample.
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
|
|
|
@ -20,7 +20,7 @@ If you make changes to your `docker-compose.yml` configuration these changes are
|
|||
For example, changes to environment variables (which are added after a container is built, but before the container's command is executed) are not updated after restarting.
|
||||
|
||||
If you are looking to configure a service's restart policy, please refer to
|
||||
[restart](/compose/compose-file/index.md#restart) in Compose file v3 and
|
||||
[restart](/compose/compose-file/compose-file-v2.md#restart) in Compose v2. Note that if
|
||||
you are [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md),
|
||||
you should use [restart_policy](/compose/compose-file/index.md#restart), instead.
|
||||
[restart](../compose-file/index.md#restart) in Compose file v3 and
|
||||
[restart](../compose-file/compose-file-v2.md#restart) in Compose v2. Note that if
|
||||
you are [deploying a stack in swarm mode](../../engine/reference/commandline/stack_deploy.md),
|
||||
you should use [restart_policy](../compose-file/index.md#restart), instead.
|
||||
|
|
|
@ -26,7 +26,7 @@ Numbers are specified as arguments in the form `service=num`. For example:
|
|||
docker-compose scale web=2 worker=3
|
||||
|
||||
>**Tip**: Alternatively, in
|
||||
[Compose file version 3.x](/compose/compose-file/index.md), you can specify
|
||||
[replicas](/compose/compose-file/index.md#replicas)
|
||||
under the [deploy](/compose/compose-file/index.md#deploy) key as part of a
|
||||
[Compose file version 3.x](../compose-file/index.md), you can specify
|
||||
[replicas](../compose-file/index.md#replicas)
|
||||
under the [deploy](../compose-file/index.md#deploy) key as part of a
|
||||
service configuration for [Swarm mode](/engine/swarm/). The `deploy` key and its sub-options (including `replicas`) only works with the `docker stack deploy` command, not `docker-compose up` or `docker-compose run`.
|
||||
|
|
|
@ -668,8 +668,8 @@ naming scheme accordingly before upgrading.
|
|||
|
||||
- Added support for `extra_hosts` in build configuration
|
||||
|
||||
- Added support for the [long syntax](/compose/compose-file/index.md#long-syntax-3) for volume entries, as previously introduced in the 3.2 format.
|
||||
Using this syntax will create [mounts](/storage/bind-mounts.md) instead of volumes.
|
||||
- Added support for the [long syntax](compose-file/index.md#long-syntax-3) for volume entries, as previously introduced in the 3.2 format.
|
||||
Using this syntax will create [mounts](../storage/bind-mounts.md) instead of volumes.
|
||||
|
||||
#### Compose file version 2.1 and up
|
||||
|
||||
|
@ -2083,7 +2083,7 @@ The highlights:
|
|||
|
||||
This means the GitHub repository has moved to [https://github.com/docker/fig](https://github.com/docker/fig) and our IRC channel is now #docker-fig on Freenode.
|
||||
|
||||
- Fig can be used with the [official Docker OS X installer](/docker-for-mac/install.md). Boot2Docker will mount the home directory from your host machine so volumes work as expected.
|
||||
- Fig can be used with the [official Docker OS X installer](../docker-for-mac/install.md). Boot2Docker will mount the home directory from your host machine so volumes work as expected.
|
||||
|
||||
- Fig supports Docker 1.3.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ title: Sample apps with Compose
|
|||
---
|
||||
|
||||
The following samples show the various aspects of how to work with Docker
|
||||
Compose. As a prerequisite, be sure to [install Docker Compose](/compose/install.md)
|
||||
Compose. As a prerequisite, be sure to [install Docker Compose](install.md)
|
||||
if you have not already done so.
|
||||
|
||||
## Key concepts these samples cover
|
||||
|
@ -13,22 +13,22 @@ if you have not already done so.
|
|||
The samples should help you to:
|
||||
|
||||
- define services based on Docker images using
|
||||
[Compose files](/compose/compose-file/index.md) `docker-compose.yml` and
|
||||
[Compose files](compose-file/index.md) `docker-compose.yml` and
|
||||
`docker-stack.yml` files
|
||||
- understand the relationship between `docker-compose.yml` and
|
||||
[Dockerfiles](/engine/reference/builder/)
|
||||
- learn how to make calls to your application services from Compose files
|
||||
- learn how to deploy applications and services to a [swarm](/engine/swarm/index.md)
|
||||
- learn how to deploy applications and services to a [swarm](../engine/swarm/index.md)
|
||||
|
||||
## Samples tailored to demo Compose
|
||||
|
||||
These samples focus specifically on Docker Compose:
|
||||
|
||||
- [Quickstart: Compose and Django](/compose/django.md) - Shows how to use Docker Compose to set up and run a simple Django/PostgreSQL app.
|
||||
- [Quickstart: Compose and Django](django.md) - Shows how to use Docker Compose to set up and run a simple Django/PostgreSQL app.
|
||||
|
||||
- [Quickstart: Compose and Rails](/compose/rails.md) - Shows how to use
|
||||
- [Quickstart: Compose and Rails](rails.md) - Shows how to use
|
||||
Docker Compose to set up and run a Rails/PostgreSQL app.
|
||||
|
||||
- [Quickstart: Compose and WordPress](/compose/wordpress.md) - Shows how to
|
||||
- [Quickstart: Compose and WordPress](wordpress.md) - Shows how to
|
||||
use Docker Compose to set up and run WordPress in an isolated environment
|
||||
with Docker containers.
|
||||
|
|
|
@ -6,7 +6,7 @@ notoc: true
|
|||
---
|
||||
|
||||
You can control the order of service startup and shutdown with the
|
||||
[depends_on](/compose/compose-file/index.md#depends_on) option. Compose always starts and stops
|
||||
[depends_on](compose-file/index.md#depends_on) option. Compose always starts and stops
|
||||
containers in dependency order, where dependencies are determined by
|
||||
`depends_on`, `links`, `volumes_from`, and `network_mode: "service:..."`.
|
||||
|
||||
|
@ -93,5 +93,5 @@ script:
|
|||
- [Get started with Django](django.md)
|
||||
- [Get started with Rails](rails.md)
|
||||
- [Get started with WordPress](wordpress.md)
|
||||
- [Command line reference](/compose/reference/index.md)
|
||||
- [Compose file reference](/compose/compose-file/index.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
|
|
|
@ -6,12 +6,12 @@ keywords: documentation, docs, docker, compose, orchestration, containers, swar
|
|||
title: Use Compose with Swarm
|
||||
---
|
||||
|
||||
Docker Compose and [Docker Swarm](/swarm/overview.md) aim to have full integration, meaning
|
||||
Docker Compose and [Docker Swarm](../swarm/overview.md) aim to have full integration, meaning
|
||||
you can point a Compose app at a Swarm cluster and have it all just work as if
|
||||
you were using a single Docker host.
|
||||
|
||||
The actual extent of integration depends on which version of the
|
||||
[Compose file format](/compose/compose-file/compose-versioning.md) you are using:
|
||||
[Compose file format](compose-file/compose-versioning.md) you are using:
|
||||
|
||||
1. If you're using version 1 along with `links`, your app works, but Swarm
|
||||
schedules all containers on one host, because links between containers
|
||||
|
@ -21,11 +21,11 @@ The actual extent of integration depends on which version of the
|
|||
|
||||
- subject to the [limitations](swarm.md#limitations) described below,
|
||||
|
||||
- as long as the Swarm cluster is configured to use the [overlay driver](/network/overlay.md),
|
||||
- as long as the Swarm cluster is configured to use the [overlay driver](../network/overlay.md),
|
||||
or a custom driver which supports multi-host networking.
|
||||
|
||||
Read [Get started with multi-host networking](/network/network-tutorial-overlay.md) to see how to
|
||||
set up a Swarm cluster with [Docker Machine](/machine/overview.md) and the overlay driver. Once you've got it running, deploying your app to it should be as simple as:
|
||||
Read [Get started with multi-host networking](../network/network-tutorial-overlay.md) to see how to
|
||||
set up a Swarm cluster with [Docker Machine](../machine/overview.md) and the overlay driver. Once you've got it running, deploying your app to it should be as simple as:
|
||||
|
||||
$ eval "$(docker-machine env --swarm <name of swarm master machine>)"
|
||||
$ docker-compose up
|
||||
|
@ -171,4 +171,4 @@ them.
|
|||
- "affinity:image==redis"
|
||||
|
||||
For the full set of available filters and expressions, see the
|
||||
[Swarm documentation](/swarm/scheduler/filter.md).
|
||||
[Swarm documentation](../swarm/scheduler/filter.md).
|
||||
|
|
|
@ -67,7 +67,7 @@ Compose to set up and run WordPress. Before starting, make sure you have
|
|||
> **Notes**:
|
||||
>
|
||||
* The docker volume `db_data` persists any updates made by WordPress
|
||||
to the database. [Learn more about docker volumes](/storage/volumes.md)
|
||||
to the database. [Learn more about docker volumes](../storage/volumes.md)
|
||||
>
|
||||
* WordPress Multisite works only on ports `80` and `443`.
|
||||
{: .note-vanilla}
|
||||
|
@ -76,7 +76,7 @@ Compose to set up and run WordPress. Before starting, make sure you have
|
|||
|
||||
Now, run `docker-compose up -d` from your project directory.
|
||||
|
||||
This runs [`docker-compose up`](/compose/reference/up.md) in detached mode, pulls
|
||||
This runs [`docker-compose up`](reference/up.md) in detached mode, pulls
|
||||
the needed Docker images, and starts the wordpress and database containers, as shown in
|
||||
the example below.
|
||||
|
||||
|
@ -117,7 +117,7 @@ administrator.
|
|||
because the containers are still being initialized and may take a couple of
|
||||
minutes before the first load.
|
||||
|
||||
If you are using [Docker Machine](/machine/index.md), you can run the command
|
||||
If you are using [Docker Machine](../machine/index.md), you can run the command
|
||||
`docker-machine ip MACHINE_VM` to get the machine address, and then open
|
||||
`http://MACHINE_VM_IP:8000` in a web browser.
|
||||
|
||||
|
@ -131,7 +131,7 @@ browser.
|
|||
|
||||
### Shutdown and cleanup
|
||||
|
||||
The command [`docker-compose down`](/compose/reference/down.md) removes the
|
||||
The command [`docker-compose down`](reference/down.md) removes the
|
||||
containers and default network, but preserves your WordPress database.
|
||||
|
||||
The command `docker-compose down --volumes` removes the containers, default
|
||||
|
@ -139,10 +139,10 @@ network, and the WordPress database.
|
|||
|
||||
## More Compose documentation
|
||||
|
||||
- [User guide](/compose/index.md)
|
||||
- [Installing Compose](/compose/install.md)
|
||||
- [Getting Started](/compose/gettingstarted.md)
|
||||
- [Get started with Django](/compose/django.md)
|
||||
- [Get started with Rails](/compose/rails.md)
|
||||
- [Command line reference](/compose/reference/index.md)
|
||||
- [Compose file reference](/compose/compose-file/index.md)
|
||||
- [User guide](index.md)
|
||||
- [Installing Compose](install.md)
|
||||
- [Getting Started](gettingstarted.md)
|
||||
- [Get started with Django](django.md)
|
||||
- [Get started with Rails](rails.md)
|
||||
- [Command line reference](reference/index.md)
|
||||
- [Compose file reference](compose-file/index.md)
|
||||
|
|
Loading…
Reference in New Issue