From 0f3caaca6a234275a90798febc8b3ec336bc37f9 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 8 Apr 2020 15:27:02 +0200 Subject: [PATCH 01/10] 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 --- compose/aspnet-mssql-compose.md | 12 +-- compose/completion.md | 4 +- compose/compose-file/compose-file-v1.md | 24 ++--- compose/compose-file/compose-file-v2.md | 56 +++++----- compose/compose-file/compose-versioning.md | 20 ++-- compose/compose-file/index.md | 118 ++++++++++----------- compose/django.md | 16 +-- compose/env-file.md | 10 +- compose/environment-variables.md | 12 +-- compose/extends.md | 16 +-- compose/faq.md | 10 +- compose/gettingstarted.md | 20 ++-- compose/index.md | 24 ++--- compose/install.md | 19 ++-- compose/link-env-deprecated.md | 10 +- compose/networking.md | 24 ++--- compose/production.md | 8 +- compose/rails.md | 14 +-- compose/reference/build.md | 4 +- compose/reference/envvars.md | 12 +-- compose/reference/events.md | 2 +- compose/reference/overview.md | 6 +- compose/reference/pull.md | 2 +- compose/reference/restart.md | 8 +- compose/reference/scale.md | 6 +- compose/release-notes.md | 6 +- compose/samples-for-compose.md | 12 +-- compose/startup-order.md | 6 +- compose/swarm.md | 12 +-- compose/wordpress.md | 22 ++-- 30 files changed, 257 insertions(+), 258 deletions(-) diff --git a/compose/aspnet-mssql-compose.md b/compose/aspnet-mssql-compose.md index 43f81613387e..99ee64087106 100644 --- a/compose/aspnet-mssql-compose.md +++ b/compose/aspnet-mssql-compose.md @@ -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 diff --git a/compose/completion.md b/compose/completion.md index 23f42e66810d..ca3fa0d00835 100644 --- a/compose/completion.md +++ b/compose/completion.md @@ -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) diff --git a/compose/compose-file/compose-file-v1.md b/compose/compose-file/compose-file-v1.md index e29a7838e2ce..11aeb134ed79 100644 --- a/compose/compose-file/compose-file-v1.md +++ b/compose/compose-file/compose-file-v1.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) diff --git a/compose/compose-file/compose-file-v2.md b/compose/compose-file/compose-file-v2.md index a761c50a0ec4..a93e56f7a33c 100644 --- a/compose/compose-file/compose-file-v2.md +++ b/compose/compose-file/compose-file-v2.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) diff --git a/compose/compose-file/compose-versioning.md b/compose/compose-file/compose-versioning.md index e993127d5e88..8df2d3ec4b56 100644 --- a/compose/compose-file/compose-versioning.md +++ b/compose/compose-file/compose-versioning.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): diff --git a/compose/compose-file/index.md b/compose/compose-file/index.md index a5317f336181..8411ba9e6610 100644 --- a/compose/compose-file/index.md +++ b/compose/compose-file/index.md @@ -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) diff --git a/compose/django.md b/compose/django.md index 07f55215de13..8bd5ad9a8d1b 100644 --- a/compose/django.md +++ b/compose/django.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 (`: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) diff --git a/compose/env-file.md b/compose/env-file.md index 9b314490b857..c13823fb3ac2 100644 --- a/compose/env-file.md +++ b/compose/env-file.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) diff --git a/compose/environment-variables.md b/compose/environment-variables.md index 668eafffe4d8..6fbae3885eb5 100644 --- a/compose/environment-variables.md +++ b/compose/environment-variables.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). diff --git a/compose/extends.md b/compose/extends.md index 2724132480dd..21bc7028df46 100644 --- a/compose/extends.md +++ b/compose/extends.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) diff --git a/compose/faq.md b/compose/faq.md index 03248878b31f..51d9fc648cca 100644 --- a/compose/faq.md +++ b/compose/faq.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) diff --git a/compose/gettingstarted.md b/compose/gettingstarted.md index 26477131874b..f9ca077ce67f 100644 --- a/compose/gettingstarted.md +++ b/compose/gettingstarted.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) diff --git a/compose/index.md b/compose/index.md index 9847e579dfd9..5a5aa7142eaf 100644 --- a/compose/index.md +++ b/compose/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. diff --git a/compose/install.md b/compose/install.md index 56e65bbac72e..96384ea7b745 100644 --- a/compose/install.md +++ b/compose/install.md @@ -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)
@@ -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) diff --git a/compose/link-env-deprecated.md b/compose/link-env-deprecated.md index cebc3b512901..e163dbd1332c 100644 --- a/compose/link-env-deprecated.md +++ b/compose/link-env-deprecated.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) diff --git a/compose/networking.md b/compose/networking.md index f0acd87de6b1..01daa9e0a7b7 100644 --- a/compose/networking.md +++ b/compose/networking.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: diff --git a/compose/production.md b/compose/production.md index 5022a2a05cc6..aff87a64add6 100644 --- a/compose/production.md +++ b/compose/production.md @@ -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) diff --git a/compose/rails.md b/compose/rails.md index c29999a33444..4f0e573bef39 100644 --- a/compose/rails.md +++ b/compose/rails.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 (`: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) diff --git a/compose/reference/build.md b/compose/reference/build.md index 103c701c716b..26ad7897ef50 100644 --- a/compose/reference/build.md +++ b/compose/reference/build.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. diff --git a/compose/reference/envvars.md b/compose/reference/envvars.md index 58fb7f77a9a8..387b49c393ab 100644 --- a/compose/reference/envvars.md +++ b/compose/reference/envvars.md @@ -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) diff --git a/compose/reference/events.md b/compose/reference/events.md index 2ff3c04f273d..e7a97aff91b2 100644 --- a/compose/reference/events.md +++ b/compose/reference/events.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). diff --git a/compose/reference/overview.md b/compose/reference/overview.md index 9e2f3abcc129..a12c8abac2ab 100644 --- a/compose/reference/overview.md +++ b/compose/reference/overview.md @@ -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) diff --git a/compose/reference/pull.md b/compose/reference/pull.md index d86d813a82a9..de3b36332f1b 100644 --- a/compose/reference/pull.md +++ b/compose/reference/pull.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' diff --git a/compose/reference/restart.md b/compose/reference/restart.md index 8b361d4d3bbb..fd6639039e8b 100644 --- a/compose/reference/restart.md +++ b/compose/reference/restart.md @@ -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. diff --git a/compose/reference/scale.md b/compose/reference/scale.md index b0487e5ca008..39c4c8198081 100644 --- a/compose/reference/scale.md +++ b/compose/reference/scale.md @@ -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`. diff --git a/compose/release-notes.md b/compose/release-notes.md index 43fa70e6f51b..c2ea3ee4e204 100644 --- a/compose/release-notes.md +++ b/compose/release-notes.md @@ -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. diff --git a/compose/samples-for-compose.md b/compose/samples-for-compose.md index 555ea5b23651..e50c594230a6 100644 --- a/compose/samples-for-compose.md +++ b/compose/samples-for-compose.md @@ -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. diff --git a/compose/startup-order.md b/compose/startup-order.md index d18e5aaa42a4..2550a4c24b6f 100644 --- a/compose/startup-order.md +++ b/compose/startup-order.md @@ -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) diff --git a/compose/swarm.md b/compose/swarm.md index e9fa52888738..56ecd3d0ecd7 100644 --- a/compose/swarm.md +++ b/compose/swarm.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 )" $ 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). diff --git a/compose/wordpress.md b/compose/wordpress.md index a147c4d64926..ad05f3a3b84a 100644 --- a/compose/wordpress.md +++ b/compose/wordpress.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) From 9cd60d843e5a3391a483a148033505e5879176fb Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 8 Apr 2020 15:36:28 +0200 Subject: [PATCH 02/10] develop: 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 --- develop/dev-best-practices.md | 26 ++++----- develop/develop-images/baseimages.md | 8 +-- .../dockerfile_best-practices.md | 54 +++++++++---------- develop/develop-images/image_management.md | 21 +++----- develop/index.md | 16 +++--- 5 files changed, 58 insertions(+), 67 deletions(-) diff --git a/develop/dev-best-practices.md b/develop/dev-best-practices.md index 7dbbf2bb36f9..ae3b2b62f0c4 100644 --- a/develop/dev-best-practices.md +++ b/develop/dev-best-practices.md @@ -20,7 +20,7 @@ keep image size small: starting with a generic `ubuntu` image and installing `openjdk` as part of the Dockerfile. -- [Use multistage builds](/develop/develop-images/multistage-build.md). For +- [Use multistage builds](develop-images/multistage-build.md). For instance, you can use the `maven` image to build your Java application, then reset to the `tomcat` image and copy the Java artifacts into the correct location to deploy your app, all in the same Dockerfile. This means that your @@ -45,7 +45,7 @@ keep image size small: ``` - If you have multiple images with a lot in common, consider creating your own - [base image](/develop/develop-images/baseimages.md) with the shared + [base image](develop-images/baseimages.md) with the shared components, and basing your unique images on that. Docker only needs to load the common layers once, and they are cached. This means that your derivative images use memory on the Docker host more efficiently and load more @@ -63,17 +63,17 @@ keep image size small: ## Where and how to persist application data - **Avoid** storing application data in your container's writable layer using - [storage drivers](/storage/storagedriver/select-storage-driver.md). This increases the + [storage drivers](../storage/storagedriver/select-storage-driver.md). This increases the size of your container and is less efficient from an I/O perspective than using volumes or bind mounts. -- Instead, store data using [volumes](/storage/volumes.md). +- Instead, store data using [volumes](../storage/volumes.md). - One case where it is appropriate to use - [bind mounts](/storage/bind-mounts.md) is during development, + [bind mounts](../storage/bind-mounts.md) is during development, when you may want to mount your source directory or a binary you just built into your container. For production, use a volume instead, mounting it into the same location as you mounted a bind mount during development. -- For production, use [secrets](/engine/swarm/secrets.md) to store sensitive - application data used by services, and use [configs](/engine/swarm/configs.md) +- For production, use [secrets](../engine/swarm/secrets.md) to store sensitive + application data used by services, and use [configs](../engine/swarm/configs.md) for non-sensitive data such as configuration files. If you currently use standalone containers, consider migrating to use single-replica services, so that you can take advantage of these service-only features. @@ -82,13 +82,13 @@ keep image size small: ## Use CI/CD for testing and deployment - When you check in a change to source control or create a pull request, use - [Docker Hub](/docker-hub/builds/index.md) or + [Docker Hub](../docker-hub/builds/index.md) or another CI/CD pipeline to automatically build and tag a Docker image and test it. -- Take this even further with [Docker Engine - Enterprise](/ee/index.md) by requiring - your development, testing, and security teams to sign images before they can - be deployed into production. This way, you can be sure that before an image is +- Take this even further with by requiring your development, testing, and + security teams to [sign images](../engine/reference/commandline/trust.md) + before they are deployed into production. This way, before an image is deployed into production, it has been tested and signed off by, for instance, development, quality, and security teams. @@ -96,6 +96,6 @@ keep image size small: | Development | Production | |:--------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Use bind mounts to give your container access to your source code. | Use volumes to store container data. | -| Use Docker Desktop for Mac or Docker Desktop for Windows. | Use Docker Engine - Enterprise if possible, with [userns mapping](/engine/security/userns-remap.md) for greater isolation of Docker processes from host processes. | +| Use bind mounts to give your container access to your source code. | Use volumes to store container data. | +| Use Docker Desktop for Mac or Docker Desktop for Windows. | Use Docker Engine, if possible with [userns mapping](../engine/security/userns-remap.md) for greater isolation of Docker processes from host processes. | | Don't worry about time drift. | Always run an NTP client on the Docker host and within each container process and sync them all to the same NTP server. If you use swarm services, also ensure that each Docker node syncs its clocks to the same time source as the containers. | diff --git a/develop/develop-images/baseimages.md b/develop/develop-images/baseimages.md index 3de9341e419d..8056063eb84c 100644 --- a/develop/develop-images/baseimages.md +++ b/develop/develop-images/baseimages.md @@ -11,13 +11,13 @@ Most Dockerfiles start from a parent image. If you need to completely control the contents of your image, you might need to create a base image instead. Here's the difference: -- A [parent image](/glossary.md#parent_image) is the image that your +- A [parent image](../../glossary.md#parent_image) is the image that your image is based on. It refers to the contents of the `FROM` directive in the Dockerfile. Each subsequent declaration in the Dockerfile modifies this parent image. Most Dockerfiles start from a parent image, rather than a base image. However, the terms are sometimes used interchangeably. -- A [base image](/glossary.md#base_image) has `FROM scratch` in its Dockerfile. +- A [base image](../../glossary.md#base_image) has `FROM scratch` in its Dockerfile. This topic shows you several ways to create a base image. The specific process will depend heavily on the Linux distribution you want to package. We have some @@ -115,7 +115,7 @@ If you want to test it out, you can clone There are lots of resources available to help you write your `Dockerfile`. -* There's a [complete guide to all the instructions](/engine/reference/builder.md) available for use in a `Dockerfile` in the reference section. +* There's a [complete guide to all the instructions](../../engine/reference/builder.md) available for use in a `Dockerfile` in the reference section. * To help you write a clear, readable, maintainable `Dockerfile`, we've also written a [`Dockerfile` best practices guide](dockerfile_best-practices.md). -* If your goal is to create a new Official Image, be sure to read up on Docker's [Official Images](/docker-hub/official_images/). +* If your goal is to create a new Official Image, be sure to read up on Docker's [Official Images](../../docker-hub/official_images.md). diff --git a/develop/develop-images/dockerfile_best-practices.md b/develop/develop-images/dockerfile_best-practices.md index daa07933f8d7..8b20b6691acc 100644 --- a/develop/develop-images/dockerfile_best-practices.md +++ b/develop/develop-images/dockerfile_best-practices.md @@ -16,7 +16,7 @@ efficient images. Docker builds images automatically by reading the instructions from a `Dockerfile` -- a text file that contains all commands, in order, needed to build a given image. A `Dockerfile` adheres to a specific format and set of -instructions which you can find at [Dockerfile reference](/engine/reference/builder/). +instructions which you can find at [Dockerfile reference](../../engine/reference/builder.md). A Docker image consists of read-only layers each of which represents a Dockerfile instruction. The layers are stacked and each one is a delta of the @@ -42,7 +42,7 @@ the running container, such as writing new files, modifying existing files, and deleting files, are written to this thin writable container layer. For more on image layers (and how Docker builds and stores images), see -[About storage drivers](/storage/storagedriver/). +[About storage drivers](../../storage/storagedriver/index.md). ## General guidelines and recommendations @@ -247,7 +247,7 @@ EOF To exclude files not relevant to the build (without restructuring your source repository) use a `.dockerignore` file. This file supports exclusion patterns similar to `.gitignore` files. For information on creating one, see the -[.dockerignore file](/engine/reference/builder.md#dockerignore-file). +[.dockerignore file](../../engine/reference/builder.md#dockerignore-file). ### Use multi-stage builds @@ -313,14 +313,14 @@ database, and an in-memory cache in a decoupled manner. Limiting each container to one process is a good rule of thumb, but it is not a hard and fast rule. For example, not only can containers be -[spawned with an init process](/engine/reference/run.md#specify-an-init-process), +[spawned with an init process](../../engine/reference/run.md#specify-an-init-process), some programs might spawn additional processes of their own accord. For instance, [Celery](http://www.celeryproject.org/) can spawn multiple worker processes, and [Apache](https://httpd.apache.org/) can create one process per request. Use your best judgment to keep containers as clean and modular as possible. If -containers depend on each other, you can use [Docker container networks](/network/index.md) +containers depend on each other, you can use [Docker container networks](../../network/index.md) to ensure that these containers can communicate. ### Minimize the number of layers @@ -399,7 +399,7 @@ maintainable `Dockerfile`. ### FROM -[Dockerfile reference for the FROM instruction](/engine/reference/builder.md#from) +[Dockerfile reference for the FROM instruction](../../engine/reference/builder.md#from) Whenever possible, use current official images as the basis for your images. We recommend the [Alpine image](https://hub.docker.com/_/alpine/) as it @@ -408,7 +408,7 @@ being a full Linux distribution. ### LABEL -[Understanding object labels](/config/labels-custom-metadata.md) +[Understanding object labels](../../config/labels-custom-metadata.md) You can add labels to your image to help organize images by project, record licensing information, to aid in automation, or for other reasons. For each @@ -448,15 +448,15 @@ LABEL vendor=ACME\ Incorporated \ com.example.release-date="2015-02-12" ``` -See [Understanding object labels](/config/labels-custom-metadata.md) +See [Understanding object labels](../../config/labels-custom-metadata.md) for guidelines about acceptable label keys and values. For information about querying labels, refer to the items related to filtering in -[Managing labels on objects](/config/labels-custom-metadata.md#manage-labels-on-objects). -See also [LABEL](/engine/reference/builder/#label) in the Dockerfile reference. +[Managing labels on objects](../../config/labels-custom-metadata.md#manage-labels-on-objects). +See also [LABEL](../../engine/reference/builder.md#label) in the Dockerfile reference. ### RUN -[Dockerfile reference for the RUN instruction](/engine/reference/builder.md#run) +[Dockerfile reference for the RUN instruction](../../engine/reference/builder.md#run) Split long or complex `RUN` statements on multiple lines separated with backslashes to make your `Dockerfile` more readable, understandable, and @@ -470,7 +470,7 @@ look out for. Avoid `RUN apt-get upgrade` and `dist-upgrade`, as many of the "essential" packages from the parent images cannot upgrade inside an -[unprivileged container](/engine/reference/run.md#security-configuration). If a package +[unprivileged container](../../engine/reference/run.md#security-configuration). If a package contained in the parent image is out-of-date, contact its maintainers. If you know there is a particular package, `foo`, that needs to be updated, use `apt-get install -y foo` to update automatically. @@ -592,7 +592,7 @@ RUN set -o pipefail && wget -O - https://some.site | wc -l > /number ### CMD -[Dockerfile reference for the CMD instruction](/engine/reference/builder.md#cmd) +[Dockerfile reference for the CMD instruction](../../engine/reference/builder.md#cmd) The `CMD` instruction should be used to run the software contained in your image, along with any arguments. `CMD` should almost always be used in the form @@ -606,13 +606,13 @@ python and perl. For example, `CMD ["perl", "-de0"]`, `CMD ["python"]`, or `CMD ["php", "-a"]`. Using this form means that when you execute something like `docker run -it python`, you’ll get dropped into a usable shell, ready to go. `CMD` should rarely be used in the manner of `CMD ["param", "param"]` in -conjunction with [`ENTRYPOINT`](/engine/reference/builder.md#entrypoint), unless +conjunction with [`ENTRYPOINT`](../../engine/reference/builder.md#entrypoint), unless you and your expected users are already quite familiar with how `ENTRYPOINT` works. ### EXPOSE -[Dockerfile reference for the EXPOSE instruction](/engine/reference/builder.md#expose) +[Dockerfile reference for the EXPOSE instruction](../../engine/reference/builder.md#expose) The `EXPOSE` instruction indicates the ports on which a container listens for connections. Consequently, you should use the common, traditional port for @@ -627,7 +627,7 @@ the recipient container back to the source (ie, `MYSQL_PORT_3306_TCP`). ### ENV -[Dockerfile reference for the ENV instruction](/engine/reference/builder.md#env) +[Dockerfile reference for the ENV instruction](../../engine/reference/builder.md#env) To make new software easier to run, you can use `ENV` to update the `PATH` environment variable for the software your container installs. For @@ -694,8 +694,8 @@ $ docker run --rm test sh -c 'echo $ADMIN_USER' ### ADD or COPY -- [Dockerfile reference for the ADD instruction](/engine/reference/builder.md#add) -- [Dockerfile reference for the COPY instruction](/engine/reference/builder.md#copy) +- [Dockerfile reference for the ADD instruction](../../engine/reference/builder.md#add) +- [Dockerfile reference for the COPY instruction](../../engine/reference/builder.md#copy) Although `ADD` and `COPY` are functionally similar, generally speaking, `COPY` is preferred. That’s because it’s more transparent than `ADD`. `COPY` only @@ -746,7 +746,7 @@ auto-extraction capability, you should always use `COPY`. ### ENTRYPOINT -[Dockerfile reference for the ENTRYPOINT instruction](/engine/reference/builder.md#entrypoint) +[Dockerfile reference for the ENTRYPOINT instruction](../../engine/reference/builder.md#entrypoint) The best use for `ENTRYPOINT` is to set the image's main command, allowing that image to be run as though it was that command (and then use `CMD` as the @@ -803,7 +803,7 @@ exec "$@" > This script uses [the `exec` Bash command](http://wiki.bash-hackers.org/commands/builtin/exec) > so that the final running application becomes the container's PID 1. This > allows the application to receive any Unix signals sent to the container. -> For more, see the [`ENTRYPOINT` reference](/engine/reference/builder.md#entrypoint). +> For more, see the [`ENTRYPOINT` reference](../../engine/reference/builder.md#entrypoint). The helper script is copied into the container and run via `ENTRYPOINT` on container start: @@ -836,7 +836,7 @@ $ docker run --rm -it postgres bash ### VOLUME -[Dockerfile reference for the VOLUME instruction](/engine/reference/builder.md#volume) +[Dockerfile reference for the VOLUME instruction](../../engine/reference/builder.md#volume) The `VOLUME` instruction should be used to expose any database storage area, configuration storage, or files/folders created by your docker container. You @@ -845,7 +845,7 @@ parts of your image. ### USER -[Dockerfile reference for the USER instruction](/engine/reference/builder.md#user) +[Dockerfile reference for the USER instruction](../../engine/reference/builder.md#user) If a service can run without privileges, use `USER` to change to a non-root user. Start by creating the user and group in the `Dockerfile` with something @@ -874,7 +874,7 @@ frequently. ### WORKDIR -[Dockerfile reference for the WORKDIR instruction](/engine/reference/builder.md#workdir) +[Dockerfile reference for the WORKDIR instruction](../../engine/reference/builder.md#workdir) For clarity and reliability, you should always use absolute paths for your `WORKDIR`. Also, you should use `WORKDIR` instead of proliferating instructions @@ -883,7 +883,7 @@ maintain. ### ONBUILD -[Dockerfile reference for the ONBUILD instruction](/engine/reference/builder.md#onbuild) +[Dockerfile reference for the ONBUILD instruction](../../engine/reference/builder.md#onbuild) An `ONBUILD` command executes after the current `Dockerfile` build completes. `ONBUILD` executes in any child image derived `FROM` the current image. Think @@ -917,8 +917,8 @@ These Official Images have exemplary `Dockerfile`s: ## Additional resources: -* [Dockerfile Reference](/engine/reference/builder.md) +* [Dockerfile Reference](../../engine/reference/builder.md) * [More about Base Images](baseimages.md) -* [More about Automated Builds](/docker-hub/builds/) -* [Guidelines for Creating Official Images](/docker-hub/official_images/) +* [More about Automated Builds](../../docker-hub/builds/index.md) +* [Guidelines for Creating Official Images](../../docker-hub/official_images.md) diff --git a/develop/develop-images/image_management.md b/develop/develop-images/image_management.md index 7d28b36800a7..c07ea91e23e0 100644 --- a/develop/develop-images/image_management.md +++ b/develop/develop-images/image_management.md @@ -10,16 +10,15 @@ title: Manage images The easiest way to make your images available for use by others inside or outside your organization is to use a Docker registry, such as [Docker Hub](#docker-hub), -[Docker Trusted Registry](#docker-trusted-registry), or -by running your own [private registry](#docker-registry). +or by running your own [private registry](#docker-registry). ## Docker Hub -[Docker Hub](/docker-hub/) is a public registry managed by Docker, Inc. It -centralizes information about organizations, user accounts, and images. It -includes a web UI, authentication and authorization using organizations, CLI and -API access using commands such as `docker login`, `docker pull`, and `docker +[Docker Hub](../../docker-hub/index.md) is a public registry managed by Docker, +Inc. It centralizes information about organizations, user accounts, and images. +It includes a web UI, authentication and authorization using organizations, CLI +and API access using commands such as `docker login`, `docker pull`, and `docker push`, comments, stars, search, and more. ## Docker Registry @@ -32,14 +31,6 @@ pull commands such as `docker pull myregistry.com/stevvooe/batman:voice`. Docker Hub is an instance of a Docker Registry. -## Docker Trusted Registry - -[Docker Trusted Registry](/datacenter/dtr/2.1/guides/index.md) is part of -Docker Enterprise Edition, and is a private, secure Docker registry which -includes features such as image signing and content trust, role-based access -controls, and other Enterprise-grade features. - - ## Content Trust When transferring data among networked systems, *trust* is a central concern. In @@ -49,5 +40,5 @@ operates on. You use Docker to push and pull images (data) to a registry. Content trust gives you the ability to both verify the integrity and the publisher of all the data received from a registry over any channel. -See [Content trust](/engine/security/trust/index.md) for information about +See [Content trust](../../engine/security/trust/index.md) for information about configuring and using this feature on Docker clients. diff --git a/develop/index.md b/develop/index.md index d0e3478984a4..bdc1e6da2be9 100644 --- a/develop/index.md +++ b/develop/index.md @@ -8,7 +8,7 @@ This page contains a list of resources for application developers who would like ## Prerequisites -Work through the learning modules in [Get started](/get-started/index.md) to understand how to build an image and run it as a containerized application. +Work through the learning modules in [Get started](../get-started/index.md) to understand how to build an image and run it as a containerized application. ## Develop new apps on Docker @@ -16,19 +16,19 @@ If you're just getting started developing a brand new app on Docker, check out these resources to understand some of the most common patterns for getting the most benefits from Docker. -- Use [multistage builds](/develop/develop-images/multistage-build.md){: target="_blank" class="_"} to keep your images lean -- Manage application data using [volumes](/storage/volumes.md) and [bind mounts](/storage/bind-mounts.md){: target="_blank" class="_"} -- [Scale your app](/get-started/kube-deploy.md){: target="_blank" class="_"} with kubernetes -- [Scale your app](/get-started/swarm-deploy.md){: target="_blank" class="_"} as a swarm service -- [General application development best practices](/develop/dev-best-practices.md){: target="_blank" class="_"} +- Use [multistage builds](develop-images/multistage-build.md){: target="_blank" class="_"} to keep your images lean +- Manage application data using [volumes](../storage/volumes.md) and [bind mounts](../storage/bind-mounts.md){: target="_blank" class="_"} +- [Scale your app](../get-started/kube-deploy.md){: target="_blank" class="_"} with kubernetes +- [Scale your app](../get-started/swarm-deploy.md){: target="_blank" class="_"} as a swarm service +- [General application development best practices](dev-best-practices.md){: target="_blank" class="_"} ## Learn about language-specific app development with Docker - [Docker for Java developers](https://github.com/docker/labs/tree/master/developer-tools/java/){: target="_blank" class="_"} lab - [Port a node.js app to Docker](https://github.com/docker/labs/tree/master/developer-tools/nodejs/porting){: target="_blank" class="_"} - [Ruby on Rails app on Docker](https://github.com/docker/labs/tree/master/developer-tools/ruby){: target="_blank" class="_"} lab -- [Dockerize a .Net Core application](/engine/examples/dotnetcore.md){: target="_blank" class="_"} -- [Dockerize an ASP.NET Core application with SQL Server on Linux](/compose/aspnet-mssql-compose.md){: target="_blank" class="_"} using Docker Compose +- [Dockerize a .Net Core application](../engine/examples/dotnetcore.md){: target="_blank" class="_"} +- [Dockerize an ASP.NET Core application with SQL Server on Linux](../compose/aspnet-mssql-compose.md){: target="_blank" class="_"} using Docker Compose ## Advanced development with the SDK or API From 087e391397a825aa21d9f81755d4b201ff5c4c06 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 8 Apr 2020 15:53:56 +0200 Subject: [PATCH 03/10] desktop: 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 --- docker-for-mac/dashboard.md | 4 ++-- docker-for-mac/docker-toolbox.md | 4 ++-- docker-for-mac/edge-release-notes.md | 6 +++--- docker-for-mac/faqs.md | 12 ++++++------ docker-for-mac/index.md | 14 +++++++------- docker-for-mac/install.md | 4 ++-- docker-for-mac/networking.md | 2 +- docker-for-mac/osxfs-caching.md | 11 +++++------ docker-for-mac/osxfs.md | 4 ++-- docker-for-mac/release-notes.md | 4 ++-- docker-for-mac/troubleshoot.md | 9 ++++----- docker-for-windows/dashboard.md | 4 ++-- docker-for-windows/faqs.md | 24 ++++++++++++------------ docker-for-windows/index.md | 20 ++++++++++---------- docker-for-windows/install.md | 10 +++++----- docker-for-windows/networking.md | 2 +- docker-for-windows/release-notes.md | 2 +- docker-for-windows/troubleshoot.md | 20 ++++++++++---------- 18 files changed, 77 insertions(+), 79 deletions(-) diff --git a/docker-for-mac/dashboard.md b/docker-for-mac/dashboard.md index c41fb7197611..b0dac69c6390 100644 --- a/docker-for-mac/dashboard.md +++ b/docker-for-mac/dashboard.md @@ -16,9 +16,9 @@ The Docker Desktop Dashboard offers the following benefits: In addition, the Dashboard UI allows you to: -- Navigate to the [Settings](/docker-for-mac/index/#preferences) menu to configure Docker Desktop preferences +- Navigate to the [Settings](index.md#preferences) menu to configure Docker Desktop preferences - Access the [Troubleshoot](troubleshoot.md) menu to debug and perform restart operations -- Sign into [Docker Hub](/docker-for-mac/index/#docker-hub) using your Docker ID +- Sign into [Docker Hub](index.md#docker-hub) using your Docker ID To access the Docker Desktop Dashboard, from the Docker menu, select **Dashboard**. The Dashboard provides a runtime view of all your containers and applications. diff --git a/docker-for-mac/docker-toolbox.md b/docker-for-mac/docker-toolbox.md index 55aade80f64d..241bb4dabb2c 100644 --- a/docker-for-mac/docker-toolbox.md +++ b/docker-for-mac/docker-toolbox.md @@ -103,7 +103,7 @@ continue to use Docker Machine, which operates outside the scope of Docker Deskt > `/usr/local/bin` with symlinks to its own versions. {:.warning} -See also [Unset environment variables in the current shell](/machine/get-started.md#unset-environment-variables-in-the-current-shell) +See also [Unset environment variables in the current shell](../machine/get-started.md#unset-environment-variables-in-the-current-shell) in the Docker Machine topics. ## Docker Toolbox and Docker Desktop coexistence @@ -221,5 +221,5 @@ it](https://docs.docker.com/toolbox/toolbox_install_mac/#how-to-uninstall-toolbo You might decide that you do not need Toolbox now that you have Docker Desktop, and want to uninstall it. For details on how to perform a clean uninstall of -Toolbox on Mac, see [How to uninstall Toolbox](/toolbox/toolbox_install_mac.md#how-to-uninstall-toolbox) +Toolbox on Mac, see [How to uninstall Toolbox](../toolbox/toolbox_install_mac.md#how-to-uninstall-toolbox) in the Toolbox Mac topics. diff --git a/docker-for-mac/edge-release-notes.md b/docker-for-mac/edge-release-notes.md index 3b7626516e7c..349d3f290496 100644 --- a/docker-for-mac/edge-release-notes.md +++ b/docker-for-mac/edge-release-notes.md @@ -664,7 +664,7 @@ This release contains a Kubernetes upgrade. Note that your local Kubernetes clus - [Docker 17.12.0-ce](https://github.com/docker/docker-ce/releases/tag/v17.12.0-ce) * New - - Experimental Kubernetes Support. You can now run a single-node Kubernetes cluster from the "Kubernetes" Pane in Docker For Mac Preferences and use kubectl commands as well as docker commands. See https://docs.docker.com/docker-for-mac/kubernetes/ + - Experimental Kubernetes Support. You can now run a single-node Kubernetes cluster from the "Kubernetes" Pane in Docker For Mac Preferences and use kubectl commands as well as docker commands. See [https://docs.docker.com/docker-for-mac/kubernetes/](kubernetes.md) - DNS name `docker.for.mac.host.internal` should be used instead of `docker.for.mac.localhost` (still valid) for host resolution from containers, since since there is an RFC banning the use of subdomains of localhost (See https://tools.ietf.org/html/draft-west-let-localhost-be-localhost-06). * Bug fixes and minor changes @@ -871,7 +871,7 @@ TCP connection is idle for more than five minutes (related to - Add daemon options validation - Diagnose can be cancelled & Improved help information. Fixes [docker/for-mac#1134](https://github.com/docker/for-mac/issues/1134), [docker/for-mac#1474](https://github.com/docker/for-mac/issues/1474) -- Support paging of Docker Cloud [repositories](/docker-cloud/builds/repos.md) and [organizations](/docker-cloud/orgs.md). Fixes [docker/for-mac#1538](https://github.com/docker/for-mac/issues/1538) +- Support paging of Docker Cloud [repositories](../docker-hub/repos.md) and [organizations](../docker-hub/orgs.md). Fixes [docker/for-mac#1538](https://github.com/docker/for-mac/issues/1538) ### Docker Community Edition 17.06.1-ce-mac20, 2017-07-18 @@ -1724,7 +1724,7 @@ events or unexpected unmounts. **Bug fixes and minor changes** -* Documentation moved to [https://docs.docker.com/docker-for-mac/](/docker-for-mac/) +* Documentation moved to [https://docs.docker.com/docker-for-mac/](index.md) * Allow non-admin users to launch the app for the first time (using admin creds) * Prompt non-admin users for admin password when needed in Preferences * Fixed download links, documentation links diff --git a/docker-for-mac/faqs.md b/docker-for-mac/faqs.md index 46911c28a234..0186b3704fd7 100644 --- a/docker-for-mac/faqs.md +++ b/docker-for-mac/faqs.md @@ -25,7 +25,7 @@ The **Edge channel** provides an installer with new features we are working on, ### Can I switch between Stable and Edge versions of Docker Desktop? -Yes, you can switch between Stable and Edge versions. You can try out the Edge releases to see what's new, then go back to Stable for other work. However, **you can only have one version of Docker Desktop installed at a time**. For more information, see [Switch between Stable and Edge versions](/docker-for-mac/install/#switch-between-stable-and-edge-versions). +Yes, you can switch between Stable and Edge versions. You can try out the Edge releases to see what's new, then go back to Stable for other work. However, **you can only have one version of Docker Desktop installed at a time**. For more information, see [Switch between Stable and Edge versions](install.md#switch-between-stable-and-edge-versions). ### What is Docker.app? @@ -49,7 +49,7 @@ development tools. On Docker Desktop, clients can connect to the Docker Engine through a Unix socket: `unix:///var/run/docker.sock`. -See also [Docker Engine API](/engine/api.md) and Docker Desktop for Mac forums topic +See also [Docker Engine API](../engine/api/index.md) and Docker Desktop for Mac forums topic [Using pycharm Docker plugin..](https://forums.docker.com/t/using-pycharm-docker-plugin-with-docker-beta/8617){: target="_blank" class="_"}. If you are working with applications like [Apache Maven](https://maven.apache.org/){: target="_blank" class="_"} @@ -67,7 +67,7 @@ Mac has a changing IP address (or none if you have no network access). We recomm Mac so that containers can connect to this address. For more information and examples, see -[I want to connect from a container to a service on the host](networking.md#i-want-to-connect-from-a-container-to-a-service-on-the-host) in the [Networking](/docker-for-mac/networking/) topic. +[I want to connect from a container to a service on the host](networking.md#i-want-to-connect-from-a-container-to-a-service-on-the-host) in the [Networking](networking.md) topic. ### How do I connect to a container from Mac? @@ -78,17 +78,17 @@ For more information and examples, see ### Can I use an SSH agent inside a container? -Yes, you can use the host’s SSH agent inside a container. For more information, see [SSH agent forwarding](/docker-for-mac/osxfs/#ssh-agent-forwarding). +Yes, you can use the host’s SSH agent inside a container. For more information, see [SSH agent forwarding](osxfs.md#ssh-agent-forwarding). ### How do I add custom CA certificates? Docker Desktop supports all trusted certificate authorities (CAs) (root or intermediate). For more information on adding server and client side certs, see -[Add TLS certificates](/docker-for-mac/#add-tls-certificates) in the Getting Started topic. +[Add TLS certificates](index.md#add-tls-certificates) in the Getting Started topic. ### How do I add client certificates? For information on adding client certificates, see -[Add client certificates](/docker-for-mac/index/#adding-client-certificates) in the Getting Started topic. +[Add client certificates](index.md#add-client-certificates) in the Getting Started topic. ### Can I pass through a USB device to a container? diff --git a/docker-for-mac/index.md b/docker-for-mac/index.md index 6f7d43da1475..6ef1c8c6a65c 100644 --- a/docker-for-mac/index.md +++ b/docker-for-mac/index.md @@ -205,7 +205,7 @@ You can configure Docker Desktop networking to work on a virtual private network The Docker Engine page allows you to configure the Docker daemon to determine how your containers run. Type a JSON configuration file in the box to configure the daemon settings. For a full list of options, see the Docker Engine -[dockerd commandline reference](/engine/reference/commandline/dockerd.md){:target="_blank" +[dockerd commandline reference](/engine/reference/commandline/dockerd/){:target="_blank" class="_"}. Click **Apply & Restart** to save your settings and restart Docker Desktop. @@ -274,7 +274,7 @@ experience conflicts, remove `/usr/local/bin/kubectl`. - To enable Kubernetes support and install a standalone instance of Kubernetes running as a Docker container, select **Enable Kubernetes**. To set Kubernetes as the - [default orchestrator](/docker-for-mac/kubernetes/#override-the-default-orchestrator), select **Deploy Docker Stacks to Kubernetes by default**. + [default orchestrator](kubernetes.md#override-the-default-orchestrator), select **Deploy Docker Stacks to Kubernetes by default**. Click **Apply & Restart** to save the settings. This instantiates images required to run the Kubernetes server as containers, and installs the `/usr/local/bin/kubectl` command on your Mac. @@ -411,7 +411,7 @@ also in your keychain. To learn more about how to install a CA root certificate for the registry and how to set the client TLS certificate for verification, see -[Verify repository client with certificates](/engine/security/certificates.md) +[Verify repository client with certificates](../engine/security/certificates.md) in the Docker Engine topics. ## Install shell completion @@ -479,11 +479,11 @@ For information about providing feedback on the documentation or update it yours Select **Sign in /Create Docker ID** from the Docker Desktop menu to access your [Docker Hub](https://hub.docker.com/){: target="_blank" class="_" } account. Once logged in, you can access your Docker Hub repositories and organizations directly from the Docker Desktop menu. -For more information, refer to the following [Docker Hub topics](/docker-hub/index.md){:target="_blank" +For more information, refer to the following [Docker Hub topics](../docker-hub/index.md){:target="_blank" class="_"}: -* [Organizations and Teams in Docker Hub](/docker-hub/orgs.md){:target="_blank" class="_"} -* [Builds](/docker-hub/builds/index.md){:target="_blank" class="_"} +* [Organizations and Teams in Docker Hub](../docker-hub/orgs.md){:target="_blank" class="_"} +* [Builds](../docker-hub/builds/index.md){:target="_blank" class="_"} ### Two-factor authentication @@ -512,7 +512,7 @@ After you have successfully authenticated, you can access your organizations and walkthroughs and source code. * For a summary of Docker command line interface (CLI) commands, see - [Docker CLI Reference Guide](/engine/api/index.md){: target="_blank" class="_"}. + [Docker CLI Reference Guide](../engine/api/index.md){: target="_blank" class="_"}. * Check out the blog post, [What’s New in Docker 17.06 Community Edition (CE)](https://blog.docker.com/2017/07/whats-new-docker-17-06-community-edition-ce/){: diff --git a/docker-for-mac/install.md b/docker-for-mac/install.md index 5c8a2c58b71a..0afb3dfc099f 100644 --- a/docker-for-mac/install.md +++ b/docker-for-mac/install.md @@ -48,8 +48,8 @@ Your Mac must meet the following requirements to successfully install Docker Des ## What's included in the installer The Docker Desktop installation includes - [Docker Engine](/engine/index.md), Docker CLI client, - [Docker Compose](/compose/index.md), [Notary](/notary/getting_started/), [Kubernetes](https://github.com/kubernetes/kubernetes/), and [Credential Helper](https://github.com/docker/docker-credential-helpers/). + [Docker Engine](../engine/index.md), Docker CLI client, + [Docker Compose](../compose/index.md), [Notary](../notary/getting_started.md), [Kubernetes](https://github.com/kubernetes/kubernetes/), and [Credential Helper](https://github.com/docker/docker-credential-helpers/). ## Install and run Docker Desktop on Mac diff --git a/docker-for-mac/networking.md b/docker-for-mac/networking.md index b0309556948f..1f77790d4d1b 100644 --- a/docker-for-mac/networking.md +++ b/docker-for-mac/networking.md @@ -109,5 +109,5 @@ container to random ports on the host. $ docker run -d -P --name webserver nginx ``` -See the [run command](/engine/reference/commandline/run.md) for more details on +See the [run command](../engine/reference/commandline/run.md) for more details on publish options used with `docker run`. diff --git a/docker-for-mac/osxfs-caching.md b/docker-for-mac/osxfs-caching.md index 00b41d502694..bdae01909f4b 100644 --- a/docker-for-mac/osxfs-caching.md +++ b/docker-for-mac/osxfs-caching.md @@ -4,9 +4,8 @@ keywords: mac, osxfs, volumes title: Performance tuning for volume mounts (shared filesystems) --- -[Docker 17.04 CE Edge](/edge/index.md#docker-ce-edge-new-features) adds support -for two new flags to the [docker run `-v`, -`--volume`](/engine/reference/run/#volume-shared-filesystems) +[Docker 17.04 CE Edge](https://github.com/docker/docker.github.io/blob/v17.03/edge/index.md#docker-ce-edge-new-features) adds support +for two new flags to the [docker run `-v`, `--volume`](../engine/reference/run.md#volume-shared-filesystems) option, `cached` and `delegated`, that can significantly improve the performance of mounted volume access on Docker Desktop for Mac. These options begin to solve some of the challenges discussed in @@ -25,7 +24,7 @@ Performance](https://stories.amazee.io/docker-on-mac-performance-docker-machine- gives a nice, quick summary. For information on how to configure these options in a Compose file, see -[Caching options for volume mounts](/compose/compose-file/index.md#caching-options-for-volume-mounts-docker-desktop-for-mac) +[Caching options for volume mounts](../compose/compose-file/index.md#caching-options-for-volume-mounts-docker-desktop-for-mac) the Docker Compose topics. ## Performance implications of host-container file system consistency @@ -96,8 +95,8 @@ temporary discrepancies are allowed between container and host. Each of these configurations (`consistent`, `cached`, `delegated`) can be specified as a suffix to the -[`-v`](/engine/reference/run/#volume-shared-filesystems) -option of [`docker run`](/engine/reference/run.md). For +[`-v`](../engine/reference/run.md#volume-shared-filesystems) +option of [`docker run`](../engine/reference/commandline/run.md). For example, to bind-mount `/Users/yallop/project` in a container under the path `/project`, you might run the following command: diff --git a/docker-for-mac/osxfs.md b/docker-for-mac/osxfs.md index 11e433991c39..a7749bca7a6b 100644 --- a/docker-for-mac/osxfs.md +++ b/docker-for-mac/osxfs.md @@ -63,7 +63,7 @@ By default, you can share files in `/Users/`, `/Volumes/`, `/private/`, and `/tmp` directly. To add or remove directory trees that are exported to Docker, use the **File sharing** tab in Docker preferences ![whale menu](images/whale-x.png){: .inline} -> **Preferences** -> -**File sharing**. (See [Preferences](/docker-for-mac/index.md#preferences-menu).) +**File sharing**. (See [Preferences](index.md#file-sharing).) All other paths used in `-v` bind mounts are sourced from the Moby Linux VM running the Docker @@ -117,7 +117,7 @@ The following are **unsupported file system events**: * Open * Access * Close events -* Unmount events (see Mounts) +* Unmount events (see [Mounts](#mounts)) Some events may be delivered multiple times. These limitations do not apply to events between containers, only to those events originating in macOS. diff --git a/docker-for-mac/release-notes.md b/docker-for-mac/release-notes.md index 4a9096dc9635..3ed18c603b58 100644 --- a/docker-for-mac/release-notes.md +++ b/docker-for-mac/release-notes.md @@ -290,7 +290,7 @@ Docker Desktop Community 2.1.0.0 contains the following experimental features. - Linux Kernel 4.9.93 with CEPH, DRBD, RBD, MPLS_ROUTING and MPLS_IPTUNNEL enabled * New - - Kubernetes Support. You can now run a single-node Kubernetes cluster from the "Kubernetes" Pane in Docker For Mac Preferences and use kubectl commands as well as docker commands. See https://docs.docker.com/docker-for-mac/kubernetes/ + - Kubernetes Support. You can now run a single-node Kubernetes cluster from the "Kubernetes" Pane in Docker For Mac Preferences and use kubectl commands as well as docker commands. See [https://docs.docker.com/docker-for-mac/kubernetes/](kubernetes.md) - Add an experimental SOCKS server to allow access to container networks, see [docker/for-mac#2670](https://github.com/docker/for-mac/issues/2670#issuecomment-372365274). Also see [docker/for-mac#2721](https://github.com/docker/for-mac/issues/2721) - Re-enable raw as the default disk format for users running macOS 10.13.4 and higher. Note this change only takes effect after a "reset to factory defaults" or "remove all data" (from the Whale menu -> Preferences -> Reset). Related to [docker/for-mac#2625](https://github.com/docker/for-mac/issues/2625) @@ -366,7 +366,7 @@ Docker Desktop Community 2.1.0.0 contains the following experimental features. - Clearer error message when incompatible hardware is detected. - Fix some cases where selecting "Reset" after an error did not reset properly. - Fix incorrect NTP config. Fixes [docker/for-mac#2529](https://github.com/docker/for-mac/issues/2529) - - Migration of Docker Toolbox images is not proposed anymore in Docker For Mac installer (still possible to [migrate Toolbox images manually](https://docs.docker.com/docker-for-mac/docker-toolbox/#migrating-from-docker-toolbox-to-docker-for-mac) ). + - Migration of Docker Toolbox images is not proposed anymore in Docker For Mac installer (still possible to [migrate Toolbox images manually](docker-toolbox.md#migrating-from-docker-toolbox-to-docker-desktop-on-mac) ). ### Docker Community Edition 17.12.0-ce-mac55 2018-02-27 diff --git a/docker-for-mac/troubleshoot.md b/docker-for-mac/troubleshoot.md index afa12b8d699c..df76dc89ff80 100644 --- a/docker-for-mac/troubleshoot.md +++ b/docker-for-mac/troubleshoot.md @@ -62,8 +62,7 @@ Choose ![whale menu](images/whale-x.png){: .inline} > **Troubleshoot** > **Run D Once the diagnostics are available, you can upload them and obtain a **Diagnostic ID**, which must be provided when communicating with the Docker team. For more information on our policy regarding personal data, see -[how is personal data handled in Docker -Desktop](https://docs.docker.com/docker-for-mac/faqs/#how-is-personal-data-handled-in-docker-desktop). +[how is personal data handled in Docker Desktop](faqs.md#how-is-personal-data-handled-in-docker-desktop). ![Diagnostics & Feedback with ID](images/diagnose-feedback-id.png){:width="600px"} @@ -109,8 +108,8 @@ $ open /tmp/BE9AFAAF-F68B-41D0-9D12-84760E6B8740/20190905152051.zip In addition to using the diagnose and feedback option to submit logs, you can browse the logs yourself. The following documentation is about macOS 10.12 -onwards; for older versions, see [older -documentation](v17.12/docker-for-mac/troubleshoot/#logs). +onwards; for older versions, see +[older documentation](https://github.com/docker/docker.github.io/blob/v17.12/docker-for-mac/troubleshoot.md#check-the-logs). #### In a terminal @@ -176,7 +175,7 @@ in the FAQs. If you are using mounted volumes and get runtime errors indicating an application file is not found, access to a volume mount is denied, or a service -cannot start, such as when using [Docker Compose](/compose/gettingstarted.md), +cannot start, such as when using [Docker Compose](../compose/gettingstarted.md), you might need to enable [file sharing](index.md#file-sharing). Volume mounting requires shared drives for projects that live outside of the diff --git a/docker-for-windows/dashboard.md b/docker-for-windows/dashboard.md index fb875715548f..f498ee24c912 100644 --- a/docker-for-windows/dashboard.md +++ b/docker-for-windows/dashboard.md @@ -16,9 +16,9 @@ The Docker Desktop Dashboard offers the following benefits: In addition, the Dashboard UI allows you to: -- Navigate to the [Settings](/docker-for-windows/index/#docker-settings-dialog) menu to configure Docker Desktop preferences +- Navigate to the [Settings](index.md#docker-settings-dialog) menu to configure Docker Desktop preferences - Access the [Troubleshoot](troubleshoot.md) menu to debug and perform restart operations -- Sign into [Docker Hub](/docker-for-windows/index/#docker-hub) using your Docker ID +- Sign into [Docker Hub](index.md#docker-hub) using your Docker ID To access the Docker Desktop Dashboard, from the Docker menu, select **Dashboard**. The Dashboard provides a runtime view of all your containers and applications. diff --git a/docker-for-windows/faqs.md b/docker-for-windows/faqs.md index 4fc40671dde5..1384886c8251 100644 --- a/docker-for-windows/faqs.md +++ b/docker-for-windows/faqs.md @@ -26,11 +26,11 @@ Docker Engine. Bugs, crashes, and issues can occur when using the Edge version, ### Can I switch between Stable and Edge versions of Docker Desktop? -Yes, you can switch between Stable and Edge versions. You can try out the Edge releases to see what's new, then go back to Stable for other work. However, **you can only have one version of Docker Desktop installed at a time**. For more information, see [Switch between Stable and Edge versions](/docker-for-windows/install/#switch-between-stable-and-edge-versions). +Yes, you can switch between Stable and Edge versions. You can try out the Edge releases to see what's new, then go back to Stable for other work. However, **you can only have one version of Docker Desktop installed at a time**. For more information, see [Switch between Stable and Edge versions](install.md#switch-between-stable-and-edge-versions). ## What are the system requirements for Docker Desktop? -For information about system requirements, see [Docker Desktop Windows system requirements](install/#system-requirements). +For information about system requirements, see [Docker Desktop Windows system requirements](install.md#system-requirements). ## What is an experimental feature? @@ -49,7 +49,7 @@ On Docker Desktop, clients can connect to the Docker Engine through a This sets `DOCKER_HOST` and `DOCKER_CERT_PATH` environment variables to the given values (for the named pipe or TCP socket, whichever you use). -See also [Docker Engine API](/engine/api.md) and the Docker Desktop for Windows forums topic [How to find the remote API](https://forums.docker.com/t/how-to-find-the-remote-api/20988){: target="_blank" class="_"}. +See also [Docker Engine API](../engine/api/index.md) and the Docker Desktop for Windows forums topic [How to find the remote API](https://forums.docker.com/t/how-to-find-the-remote-api/20988){: target="_blank" class="_"}. ### How do I connect from a container to a service on the host? @@ -58,28 +58,28 @@ Windows has a changing IP address (or none if you have no network access). We re The gateway is also reachable as `gateway.docker.internal`. For more information about the networking features in Docker Desktop for Windows, see -[Networking](/docker-for-windows/networking/). +[Networking](networking.md). ### How do I connect to a container from Windows? We recommend that you publish a port, or connect from another container. You can use the same method on Linux if the container is on an overlay network and not a bridge network, as these are not routed. For more information and examples, see -[I want to connect to a container from Windows](networking.md#i-want-to-connect-to-a-container-from-windows) in the [Networking](/docker-for-windows/networking/) topic. +[I want to connect to a container from Windows](networking.md#i-want-to-connect-to-a-container-from-windows) in the [Networking](networking.md) topic. ## Volumes ### Can I change permissions on shared volumes for container-specific deployment requirements? No, at this point, Docker Desktop does not enable you to control (`chmod`) -the Unix-style permissions on [shared volumes](/docker-for-windows#shared-drives) for +the Unix-style permissions on [shared volumes](index.md#file-sharing) for deployed containers, but rather sets permissions to a default value of [0777](http://permissions-calculator.org/decode/0777/){: target="_blank" class="_"} (`read`, `write`, `execute` permissions for `user` and for `group`) which is not configurable. For workarounds and to learn more, see -[Permissions errors on data directories for shared volumes](troubleshoot#permissions-errors-on-data-directories-for-shared-volumes). +[Permissions errors on data directories for shared volumes](troubleshoot.md#permissions-errors-on-data-directories-for-shared-volumes). ### How do symlinks work on Windows? @@ -96,11 +96,11 @@ Docker Desktop supports all trusted Certificate Authorities (CAs) (root or intermediate). Docker recognizes certs stored under Trust Root Certification Authorities or Intermediate Certification Authorities. - For more information on adding server and client side certs, see [Add TLS certificates](/docker-for-windows/index/#add-tls-certificates) in the Getting Started topic. + For more information on adding server and client side certs, see [Adding TLS certificates](index.md#adding-tls-certificates) in the Getting Started topic. ### How do I add client certificates? -For information on adding client certificates, see [Add TLS certificates](/docker-for-windows/index/#add-tls-certificates) in the Getting Started topic. +For information on adding client certificates, see [Adding TLS certificates](index.md#adding-tls-certificates) in the Getting Started topic. ### Can I pass through a USB device to a container? @@ -125,7 +125,7 @@ You can find a tutorial about running Windows containers on Windows Server in ### Can I install Docker Desktop on Windows 10 Home? -Windows 10 Insider Preview (Windows 10 Home) users can now install [Docker Desktop Edge 2.2.2.0](https://download.docker.com/win/edge/43066/Docker%20Desktop%20Installer.exe) or a later release with the [experimental WSL 2 support](/docker-for-windows/wsl-tech-preview/). This requires Windows Insider Preview Build 19018 or later. +Windows 10 Insider Preview (Windows 10 Home) users can now install [Docker Desktop Edge 2.2.2.0](https://download.docker.com/win/edge/43066/Docker%20Desktop%20Installer.exe) or a later release with the [experimental WSL 2 support](wsl-tech-preview.md). This requires Windows Insider Preview Build 19018 or later. Docker Desktop Stable releases require the Hyper-V feature which is not available in the Windows 10 Home edition. @@ -136,7 +136,7 @@ Docker Desktop uses the Windows Hyper-V features. While older Windows versions h ### Why does Docker Desktop fail to start when anti-virus software is installed? Some anti-virus software may be incompatible with Hyper-V and Windows 10 builds which impact Docker -Desktop. For more information, see [Docker Desktop fails to start when anti-virus software is installed](/docker-for-windows/troubleshoot/#docker-desktop-fails-to-start-when-anti-virus-software-is-installed) +Desktop. For more information, see [Docker Desktop fails to start when anti-virus software is installed](troubleshoot.md#docker-desktop-fails-to-start-when-anti-virus-software-is-installed) in [Troubleshooting](troubleshoot.md). ## Feedback @@ -150,7 +150,7 @@ functionality you'd like to see added. ### What if I have problems or questions? -You can find information about diagnosing and troubleshooting common issues in the [Logs and Troubleshooting](troubleshoot) topic. +You can find information about diagnosing and troubleshooting common issues in the [Logs and Troubleshooting](troubleshoot.md) topic. If you do not find a solution in Troubleshooting, browse issues on [Docker Desktop for Windows issues on GitHub](https://github.com/docker/for-win/issues){: target="_blank" class="_"} diff --git a/docker-for-windows/index.md b/docker-for-windows/index.md index 9d9b4ff4f318..4a25ec59d09e 100644 --- a/docker-for-windows/index.md +++ b/docker-for-windows/index.md @@ -240,8 +240,8 @@ Note that configuring file sharing is not necessary for Windows containers, only > * Shared drives are designed to allow application code to be edited on the host while being executed in containers. For non-code items such as cache directories or databases, the performance will be much better if they are stored in - the Linux VM, using a [data volume](/engine/tutorials/dockervolumes.md#data-volumes) - (named volume) or [data container](/engine/tutorials/dockervolumes.md#creating-and-mounting-a-data-volume-container). + the Linux VM, using a [data volume](../storage/volumes.md) + (named volume) or [data container](../storage/volumes.md). > * Docker Desktop sets permissions to read/write/execute for users, groups and others [0777 or a+rwx](http://permissions-calculator.org/decode/0777/). This is not configurable. See [Permissions errors on data directories for shared volumes](troubleshoot.md#permissions-errors-on-data-directories-for-shared-volumes). @@ -308,7 +308,7 @@ Updating these settings requires a reconfiguration and reboot of the Linux VM. The Docker Engine page allows you to configure the Docker daemon to determine how your containers run. Type a JSON configuration file in the box to configure the daemon settings. For a full list of options, see the Docker Engine -[dockerd commandline reference](/engine/reference/commandline/dockerd.md){:target="_blank" +[dockerd commandline reference](/engine/reference/commandline/dockerd/){:target="_blank" class="_"}. Click **Apply & Restart** to save your settings and restart Docker Desktop. @@ -465,10 +465,10 @@ The Docker Desktop Dashboard enables you to interact with containers and applica Select **Sign in /Create Docker ID** from the Docker Desktop menu to access your [Docker Hub](https://hub.docker.com/){: target="_blank" class="_" } account. Once logged in, you can access your Docker Hub repositories directly from the Docker Desktop menu. -For more information, refer to the following [Docker Hub topics](/docker-hub/index.md){: target="_blank" class="_" }: +For more information, refer to the following [Docker Hub topics](../docker-hub/index.md){: target="_blank" class="_" }: -* [Organizations and Teams in Docker Hub](/docker-hub/orgs.md){: target="_blank" class="_" } -* [Builds and Images](/docker-cloud/builds/index.md){: target="_blank" class="_" } +* [Organizations and Teams in Docker Hub](../docker-hub/orgs.md){: target="_blank" class="_" } +* [Builds and Images](../docker-hub/builds/index.md){: target="_blank" class="_" } ### Two-factor authentication @@ -522,19 +522,19 @@ You need to restart Docker Desktop after making any changes to the keychain or to the `~/.docker/certs.d` directory in order for the changes to take effect. The registry cannot be listed as an _insecure registry_ (see -[Docker Daemon](/docker-for-windows#daemon)). Docker Desktop ignores +[Docker Daemon](#docker-engine)). Docker Desktop ignores certificates listed under insecure registries, and does not send client certificates. Commands like `docker run` that attempt to pull from the registry produce error messages on the command line, as well as on the registry. To learn more about how to set the client TLS certificate for verification, see -[Verify repository client with certificates](/engine/security/certificates) +[Verify repository client with certificates](../engine/security/certificates.md) in the Docker Engine topics. ## Where to go next -* Try out the walkthrough at [Get Started](/get-started/){: target="_blank" class="_"}. +* Try out the walkthrough at [Get Started](../get-started/index.md){: target="_blank" class="_"}. * Dig in deeper with [Docker Labs](https://github.com/docker/labs/) example walkthroughs and source code. -* Refer to the [Docker CLI Reference Guide](/engine/api.md){: target="_blank" class="_"}. +* Refer to the [Docker CLI Reference Guide](/engine/reference/commandline/cli/){: target="_blank" class="_"}. diff --git a/docker-for-windows/install.md b/docker-for-windows/install.md index cb24abc240f1..e0444afb2066 100644 --- a/docker-for-windows/install.md +++ b/docker-for-windows/install.md @@ -39,9 +39,9 @@ used side-by-side with Docker Desktop. However, you can still use ### What's included in the installer -The Docker Desktop installation includes [Docker Engine](/engine/index.md), -Docker CLI client, [Docker Compose](/compose/index.md), -[Notary](/notary/getting_started.md), +The Docker Desktop installation includes [Docker Engine](../engine/index.md), +Docker CLI client, [Docker Compose](../compose/index.md), +[Notary](../notary/getting_started.md), [Kubernetes](https://github.com/kubernetes/kubernetes/), and [Credential Helper](https://github.com/docker/docker-credential-helpers/). @@ -59,7 +59,7 @@ more information, see [Running Docker Desktop in nested virtualization scenarios Looking for information on using Windows containers? -* [Switch between Windows and Linux containers](/docker-for-windows/index.md#switch-between-windows-and-linux-containers) +* [Switch between Windows and Linux containers](index.md#switch-between-windows-and-linux-containers) describes how you can toggle between Linux and Windows containers in Docker Desktop and points you to the tutorial mentioned above. * [Getting Started with Windows Containers (Lab)](https://github.com/docker/labs/blob/master/windows/windows-containers/README.md) provides a tutorial on how to set up and run Windows containers on Windows 10, Windows Server 2016 and Windows Server 2019. It shows you how to use a MusicStore application @@ -95,7 +95,7 @@ When the whale icon in the status bar stays steady, Docker Desktop is up-and-run ![whale on taskbar](images/whale-icon-systray.png) If the whale icon is hidden in the Notifications area, click the up arrow on the -taskbar to show it. To learn more, see [Docker Settings](/docker-for-windows/index.md#docker-settings-dialog). +taskbar to show it. To learn more, see [Docker Settings](index.md#docker-settings-dialog). After installing the Docker Desktop app, you also get a pop-up success message with suggested next steps, and a link to this documentation. diff --git a/docker-for-windows/networking.md b/docker-for-windows/networking.md index ec8789f01251..fb2f1b2247bb 100644 --- a/docker-for-windows/networking.md +++ b/docker-for-windows/networking.md @@ -108,5 +108,5 @@ container to random ports on the host. $ docker run -d -P --name webserver nginx ``` -See the [run command](/engine/reference/commandline/run.md) for more details on +See the [run command](../engine/reference/commandline/run.md) for more details on publish options used with `docker run`. diff --git a/docker-for-windows/release-notes.md b/docker-for-windows/release-notes.md index 50f53034e0e5..bf936050ed4f 100644 --- a/docker-for-windows/release-notes.md +++ b/docker-for-windows/release-notes.md @@ -86,7 +86,7 @@ For information about Edge releases, see the [Edge release notes](edge-release-n - Fixed a race condition when starting the WSL engine which caused Docker Desktop to incorrectly report that the containers have exited. Fixes [docker/for-win#5607](https://github.com/docker/for-win/issues/5607). - Fixed an issue where editing code inside a container resulted in an error. Fixes [docker/for-win#5528](https://github.com/docker/for-win/issues/5528). - Fixed a bug where running the command `DockerCli.exe -SharedDrives` failed to display a list of drives that are shared. Fixes [docker/for-win#5625](https://github.com/docker/for-win/issues/5625). -- Starting with Docker Desktop 2.2.0.3, you must access all shared files using their original case. For example, if you have created a file called `test`, you must open it as `test`. Attempts to open the file as `Test` will fail with the error `No such file or directory`. For more information, see _Tips on shared drives, permissions, and volume mounts_ in [File sharing](/docker-for-windows/index/#file-sharing). +- Starting with Docker Desktop 2.2.0.3, you must access all shared files using their original case. For example, if you have created a file called `test`, you must open it as `test`. Attempts to open the file as `Test` will fail with the error `No such file or directory`. For more information, see _Tips on shared drives, permissions, and volume mounts_ in [File sharing](index.md#file-sharing). ### Known issues diff --git a/docker-for-windows/troubleshoot.md b/docker-for-windows/troubleshoot.md index 98af93129fb1..9be6b857865c 100644 --- a/docker-for-windows/troubleshoot.md +++ b/docker-for-windows/troubleshoot.md @@ -22,7 +22,7 @@ The Troubleshoot page contains the following options: * **Run Diagnostics**: Select this option to diagnose any issues on Docker Desktop. For detailed information about diagnostics, see [Diagnose problems, send feedback, and create GitHub issues](#diagnose-problems-send-feedback-and-create-github-issues). -* **Reset Kubernetes cluster**: Select this option to delete all stacks and Kubernetes resources. For more information, see [Kubernetes](/docker-for-windows/index/#kubernetes). +* **Reset Kubernetes cluster**: Select this option to delete all stacks and Kubernetes resources. For more information, see [Kubernetes](index.md#kubernetes). * **Reset to factory defaults**: Choose this option to reset all options on Docker Desktop to their initial state, the same as when Docker Desktop was first installed. @@ -125,7 +125,7 @@ in the FAQs. If you are using mounted volumes and get runtime errors indicating an application file is not found, access is denied to a volume mount, or a service -cannot start, such as when using [Docker Compose](/compose/gettingstarted.md), +cannot start, such as when using [Docker Compose](../compose/gettingstarted.md), you might need to enable [shared drives](index.md#shared-drives). Volume mounting requires shared drives for Linux containers (not for Windows @@ -183,15 +183,15 @@ In the subsequent screen, verify that Hyper-V is enabled: The Docker Desktop installation includes the legacy tool Docker Machine which uses the old [`boot2docker.iso`](https://github.com/boot2docker/boot2docker){:target="_blank" class="_"}, -and the [Microsoft Hyper-V driver](/machine/drivers/hyper-v.md) to create local +and the [Microsoft Hyper-V driver](../machine/drivers/hyper-v.md) to create local virtual machines. _This is tangential to using Docker Desktop_, but if you want to use Docker Machine to create multiple local Virtual Machines (VMs), or to provision remote machines, see the -[Docker Machine](/machine/index.md) topics. This is documented only for users looking for information about Docker Machine on Windows, which requires that Hyper-V is enabled, an external network switch is active, and referenced in the flags for the `docker-machine create` command -as described in the [Docker Machine driver example](/machine/drivers/hyper-v.md#example). +[Docker Machine](../machine/index.md) topics. This is documented only for users looking for information about Docker Machine on Windows, which requires that Hyper-V is enabled, an external network switch is active, and referenced in the flags for the `docker-machine create` command +as described in the [Docker Machine driver example](../machine/drivers/hyper-v.md#example). #### Virtualization must be enabled -In addition to [Hyper-V](#hyper-v) or [WSL 2](/docker-for-windows/wsl-tech-preview.md), virtualization must be enabled. Check the +In addition to [Hyper-V](#hyper-v) or [WSL 2](wsl-tech-preview.md), virtualization must be enabled. Check the Performance tab on the Task Manager: ![Task Manager](images/virtualization-enabled.png){:width="700px"} @@ -224,9 +224,9 @@ Here are some steps to take if you experience similar problems: ![Hyper-V manager](images/hyperv-manager.png) 4. Set up an external network switch. If you plan at any point to use - [Docker Machine](/machine/overview.md) to set up multiple local VMs, you + [Docker Machine](../machine/overview.md) to set up multiple local VMs, you need this anyway, as described in the topic on the - [Hyper-V driver for Docker Machine](/machine/drivers/hyper-v.md#example). + [Hyper-V driver for Docker Machine](../machine/drivers/hyper-v.md#example). You can replace `DockerNAT` with this switch. 5. If previous steps fail to solve the problems, follow steps on the @@ -241,7 +241,7 @@ Here are some steps to take if you experience similar problems: ### Windows containers and Windows Server Docker Desktop is not supported on Windows Server. Instead, you can use -[Docker Enterprise Basic](/ee/index.md) at no additional cost. +Docker Enterprise Basic at no additional cost. If you have questions about how to run Windows containers on Windows 10, see [Switch between Windows and Linux containers](index.md#switch-between-windows-and-linux-containers). @@ -284,7 +284,7 @@ Linux containers). To reach a Windows container from the local host, you need to specify the IP address and port for the container that is running the service. -You can get the container IP address by using [`docker inspect`](/engine/reference/commandline/inspect.md) with some `--format` options +You can get the container IP address by using [`docker inspect`](../engine/reference/commandline/inspect.md) with some `--format` options and the ID or name of the container. For the example above, the command would look like this, using the name we gave to the container (`webserver`) instead of the container ID: From cef68d3fa5ad9d67a8d83cee4e37ea97a88ce1eb Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 8 Apr 2020 15:58:20 +0200 Subject: [PATCH 04/10] docker-hub: use relative markdown links Signed-off-by: Sebastiaan van Stijn --- docker-hub/builds/advanced.md | 2 +- docker-hub/builds/index.md | 5 +---- docker-hub/builds/link-source.md | 2 +- docker-hub/index.md | 12 ++++++------ docker-hub/orgs.md | 2 +- docker-hub/publish/certify-images.md | 2 +- docker-hub/repos.md | 8 ++++---- 7 files changed, 15 insertions(+), 18 deletions(-) diff --git a/docker-hub/builds/advanced.md b/docker-hub/builds/advanced.md index bf89e5c4e696..0f6228b18476 100644 --- a/docker-hub/builds/advanced.md +++ b/docker-hub/builds/advanced.md @@ -86,7 +86,7 @@ In the following example, we define a build hook that uses `docker build` argume docker build --build-arg CUSTOM=$VAR -f $DOCKERFILE_PATH -t $IMAGE_NAME . ``` -> **Caution**: A `hooks/build` file overrides the basic [docker build](/engine/reference/commandline/build.md) command +> **Caution**: A `hooks/build` file overrides the basic [docker build](/engine/reference/commandline/build/) command used by the builder, so you must include a similar build command in the hook or the automated build fails. diff --git a/docker-hub/builds/index.md b/docker-hub/builds/index.md index 0e0d2896525d..ef68346c505b 100644 --- a/docker-hub/builds/index.md +++ b/docker-hub/builds/index.md @@ -36,9 +36,6 @@ image. Automated tests do not push images to the registry on their own. [Learn m ## Configure automated build settings -> **Note**: Automated builds created with the old Docker Hub are -now Classic Automated Builds. [Learn more](classic.md) - You can configure repositories in Docker Hub so that they automatically build an image each time you push new code to your source provider. If you have [automated tests](automated-testing.md) configured, the new image is only pushed @@ -85,7 +82,7 @@ You might redirected to the settings page to [link](link-source.md) the code rep 8. For each branch or tag, enable or disable the **Build Caching** toggle. - [Build caching](/develop/develop-images/dockerfile_best-practices.md#leverage-build-cache) can save time if you are building a large image frequently or have + [Build caching](../../develop/develop-images/dockerfile_best-practices.md#leverage-build-cache) can save time if you are building a large image frequently or have many dependencies. You might want to leave build caching disabled to make sure all of your dependencies are resolved at build time, or if you have a large layer that is quicker to build locally. diff --git a/docker-hub/builds/link-source.md b/docker-hub/builds/link-source.md index 650ff886e009..bac9c290c0bb 100644 --- a/docker-hub/builds/link-source.md +++ b/docker-hub/builds/link-source.md @@ -14,7 +14,7 @@ repositories. You can configure this link for user accounts or organizations. -> **Note**: If you are linking a source code provider to create autobuilds for a team, follow the instructions to [create a service account](/docker-hub/builds.md#service-users-for-team-autobuilds) for the team before linking the account as described below. +> **Note**: If you are linking a source code provider to create autobuilds for a team, follow the instructions to [create a service account](index.md#service-users-for-team-autobuilds) for the team before linking the account as described below. ## Link to a GitHub user account diff --git a/docker-hub/index.md b/docker-hub/index.md index f3d6cf4c0ba4..b9a244909b9f 100644 --- a/docker-hub/index.md +++ b/docker-hub/index.md @@ -80,17 +80,17 @@ redirect_from: [Docker Hub](https://hub.docker.com) is a service provided by Docker for finding and sharing container images with your team. It provides the following major features: -* [Repositories](/docker-hub/repos.md): Push and pull container images. -* [Teams & Organizations](/docker-hub/orgs.md): Manage access to private +* [Repositories](repos.md): Push and pull container images. +* [Teams & Organizations](orgs.md): Manage access to private repositories of container images. -* [Official Images](/docker-hub/official_images.md): Pull and use high-quality +* [Official Images](official_images.md): Pull and use high-quality container images provided by Docker. -* [Publisher Images](/docker-hub/publish/customer_faq.md): Pull and use high- +* [Publisher Images](publish/customer_faq.md): Pull and use high- quality container images provided by external vendors. Certified images also include support and guarantee compatibility with Docker Enterprise. -* [Builds](/docker-hub/builds.md): Automatically build container images from +* [Builds](builds/index.md): Automatically build container images from GitHub and Bitbucket and push them to Docker Hub. -* [Webhooks](/docker-hub/webhooks.md): Trigger actions after a successful push +* [Webhooks](webhooks.md): Trigger actions after a successful push to a repository to integrate Docker Hub with other services. diff --git a/docker-hub/orgs.md b/docker-hub/orgs.md index 88463363ca3c..3953deef7e3e 100644 --- a/docker-hub/orgs.md +++ b/docker-hub/orgs.md @@ -29,7 +29,7 @@ Docker Hub. You've created an organization. You'll see you have a team, the **owners** team with a single member (you!). -In some situations, you can also create an organization by [converting a user account](/convert-account.md). +In some situations, you can also create an organization by [converting a user account](convert-account.md). #### The owners team diff --git a/docker-hub/publish/certify-images.md b/docker-hub/publish/certify-images.md index 500aa76b6145..116b2bb51367 100644 --- a/docker-hub/publish/certify-images.md +++ b/docker-hub/publish/certify-images.md @@ -12,7 +12,7 @@ Content that qualifies as **Docker Certified** must conform to best practices an Docker Hub lets you publish certified images as well as plugins for logging, volumes, and networks. You must certify your own _images and logging plugins_ with the `inspect` tools as explained in these docs. Currently, Docker Hub certifies your volume and networking plugins for you upon submission. -This page explains how publishers can successfully test their **Docker images**. Also available: [Certify your Docker logging plugins](certify-plugins-logging). +This page explains how publishers can successfully test their **Docker images**. Also available: [Certify your Docker logging plugins](certify-plugins-logging.md). > Content that requires a non-certified infrastructure environment cannot be published as certified. diff --git a/docker-hub/repos.md b/docker-hub/repos.md index 4db8ba7900c2..66058aeab680 100644 --- a/docker-hub/repos.md +++ b/docker-hub/repos.md @@ -21,8 +21,8 @@ To create a repository, sign into Docker Hub, click on **Repositories** then When creating a new repository: * You can choose to put it in your Docker ID -namespace, or in any [organization](/docker-hub/orgs.md) where you are an -[_owner_](/orgs/#the-owners-team). +namespace, or in any [organization](orgs.md) where you are an +[_owner_](orgs.md#the-owners-team). * The repository name needs to be unique in that namespace, can be two to 255 characters, and can only contain lowercase letters, numbers or `-` and @@ -112,7 +112,7 @@ changing its status from private to public. You can also assign more granular collaborator rights ("Read", "Write", or "Admin") on Docker Hub by using organizations and teams. For more information -see the [organizations documentation](/docker-hub/orgs.md). +see the [organizations documentation](orgs.md). ## Viewing repository tags @@ -156,7 +156,7 @@ There you can see two example results: `centos` and `ansible/centos7-ansible`. The second result shows that it comes from the public repository of a user, named `ansible/`, while the first result, `centos`, doesn't explicitly list a repository which means that it comes from the top-level namespace for -[official images](/docker-hub/official_images.md). The `/` character separates +[official images](official_images.md). The `/` character separates a user's repository from the image name. Once you've found the image you want, you can download it with `docker pull `: From 777c5d23dafd4b640016f24f92fe416f246ec848 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 8 Apr 2020 16:16:46 +0200 Subject: [PATCH 05/10] engine: use relative markdown links Signed-off-by: Sebastiaan van Stijn --- engine/api/sdk/examples.md | 4 +- engine/api/sdk/index.md | 2 +- engine/examples/apt-cacher-ng.md | 2 +- engine/examples/couchdb_data_volumes.md | 2 +- engine/examples/dotnetcore.md | 6 +- engine/examples/postgresql_service.md | 2 +- engine/faq.md | 39 ++------- engine/index.md | 4 +- engine/install/binaries.md | 8 +- engine/install/centos.md | 2 +- engine/install/debian.md | 2 +- engine/install/fedora.md | 2 +- engine/install/index.md | 12 +-- engine/install/linux-postinstall.md | 16 ++-- engine/install/ubuntu.md | 13 +-- engine/reference/commandline/config.md | 2 +- engine/reference/commandline/info.md | 4 +- engine/security/seccomp.md | 2 +- engine/security/security.md | 12 +-- engine/security/trust/content_trust.md | 2 +- engine/security/trust/deploying_notary.md | 4 +- engine/security/trust/trust_automation.md | 2 +- engine/security/trust/trust_delegation.md | 95 ++++++++------------- engine/security/trust/trust_key_mng.md | 4 +- engine/security/trust/trust_sandbox.md | 4 +- engine/swarm/admin_guide.md | 22 ++--- engine/swarm/configs.md | 10 +-- engine/swarm/how-swarm-mode-works/nodes.md | 12 +-- engine/swarm/how-swarm-mode-works/pki.md | 4 +- engine/swarm/index.md | 2 +- engine/swarm/key-concepts.md | 4 +- engine/swarm/manage-nodes.md | 4 +- engine/swarm/networking.md | 6 +- engine/swarm/secrets.md | 16 ++-- engine/swarm/services.md | 20 ++--- engine/swarm/stack-deploy.md | 14 +-- engine/swarm/swarm-mode.md | 9 +- engine/swarm/swarm-tutorial/create-swarm.md | 2 +- engine/swarm/swarm-tutorial/drain-node.md | 2 +- engine/swarm/swarm-tutorial/index.md | 14 +-- engine/tutorials/index.md | 8 +- engine/tutorials/networkingcontainers.md | 2 +- 42 files changed, 172 insertions(+), 226 deletions(-) diff --git a/engine/api/sdk/examples.md b/engine/api/sdk/examples.md index a075ceae8bd3..e21177854f9e 100644 --- a/engine/api/sdk/examples.md +++ b/engine/api/sdk/examples.md @@ -10,8 +10,8 @@ redirect_from: --- After you -[install Docker](/get-docker.md), you can -[install the Go or Python SDK](/engine/api/sdk/index.md#install-the-sdks) and +[install Docker](../../../get-docker.md), you can +[install the Go or Python SDK](index.md#install-the-sdks) and also try out the Docker Engine API. Each of these examples show how to perform a given Docker operation using the Go diff --git a/engine/api/sdk/index.md b/engine/api/sdk/index.md index ecec20f5babd..10e6e44c3fa3 100644 --- a/engine/api/sdk/index.md +++ b/engine/api/sdk/index.md @@ -167,7 +167,7 @@ hello world
-For more examples, take a look at the [SDK examples](/engine/api/sdk/examples.md). +For more examples, take a look at the [SDK examples](examples.md). ## Unofficial libraries diff --git a/engine/examples/apt-cacher-ng.md b/engine/examples/apt-cacher-ng.md index 1f98b71b9268..a167c444469b 100644 --- a/engine/examples/apt-cacher-ng.md +++ b/engine/examples/apt-cacher-ng.md @@ -6,7 +6,7 @@ title: Dockerize an apt-cacher-ng service > **Note**: > - **If you don't like sudo** then see -> [*Giving non-root access*](/engine/install/linux-postinstall.md#manage-docker-as-a-non-root-user). +> [*Giving non-root access*](../install/linux-postinstall.md#manage-docker-as-a-non-root-user). > - **If you're using macOS or docker via TCP** then you shouldn't use sudo. When you have multiple Docker servers, or build unrelated Docker diff --git a/engine/examples/couchdb_data_volumes.md b/engine/examples/couchdb_data_volumes.md index 7675b44a2466..c80559a0cbaf 100644 --- a/engine/examples/couchdb_data_volumes.md +++ b/engine/examples/couchdb_data_volumes.md @@ -5,7 +5,7 @@ title: Dockerize a CouchDB service --- > **Note**: -> - **If you don't like sudo** then see [*Giving non-root access*](/engine/install/linux-postinstall.md#manage-docker-as-a-non-root-user) +> - **If you don't like sudo** then see [*Giving non-root access*](../install/linux-postinstall.md#manage-docker-as-a-non-root-user) Here's an example of using data volumes to share the same data between two CouchDB containers. This could be used for hot upgrades, testing diff --git a/engine/examples/dotnetcore.md b/engine/examples/dotnetcore.md index 725afb523807..df7a1eec3aca 100644 --- a/engine/examples/dotnetcore.md +++ b/engine/examples/dotnetcore.md @@ -36,8 +36,8 @@ tutorial](https://www.asp.net/get-started) to initialize a project or clone our Containers](https://docs.microsoft.com/virtualization/windowscontainers/about/). The tags below are multi-arch meaning they pull either Windows or Linux containers depending on what mode is set in - [Docker Desktop for Windows](/docker-for-windows/index.md). Read more on - [switching containers](/docker-for-windows/index.md#switch-between-windows-and-linux-containers). + [Docker Desktop for Windows](../../docker-for-windows/index.md). Read more on + [switching containers](../../docker-for-windows/index.md#switch-between-windows-and-linux-containers). 3. The `Dockerfile` assumes that your application is called `aspnetapp`. Change the `Dockerfile` to use the DLL file of your project. @@ -82,7 +82,7 @@ $ docker run -d -p 8080:80 --name myapp aspnetapp ## View the web page running from a container * Go to [localhost:8080](http://localhost:8080) to access your app in a web browser. -* If you are using the Nano [Windows Container](/docker-for-windows/index.md) +* If you are using the Nano [Windows Container](../../docker-for-windows/index.md) and have not updated to the Windows Creator Update there is a bug affecting how [Windows 10 talks to Containers via "NAT"](https://github.com/Microsoft/Virtualization-Documentation/issues/181#issuecomment-252671828) (Network Address Translation). You must hit the IP of the container diff --git a/engine/examples/postgresql_service.md b/engine/examples/postgresql_service.md index 86f6bf9c321a..5b1898d75753 100644 --- a/engine/examples/postgresql_service.md +++ b/engine/examples/postgresql_service.md @@ -80,7 +80,7 @@ $ docker run --rm -P --name pg_test eg_postgresql ``` There are two ways to connect to the PostgreSQL server. We can use -[*Link Containers*](../userguide/networking/default_network/dockerlinks.md), +[*Link Containers*](../../network/links.md), or we can access it from our host (or the network). > **Note**: The `--rm` removes the container and its image when diff --git a/engine/faq.md b/engine/faq.md index 368ede34d77b..68b014f78a6b 100644 --- a/engine/faq.md +++ b/engine/faq.md @@ -56,7 +56,7 @@ offers a high-level tool with several powerful functionalities: uploads and downloads, similar to `git pull`, so new versions of a container can be transferred by only sending diffs. - - *Component re-use.* Any container can be used as a [*parent image*](/glossary.md#parent_image) to + - *Component re-use.* Any container can be used as a [*parent image*](../glossary.md#parent_image) to create more specialized components. This can be done manually or as part of an automated build. For example you can prepare the ideal Python environment, and use it as a base for 10 different applications. Your ideal PostgreSQL setup can @@ -66,7 +66,7 @@ be re-used for all your future projects. And so on. Hub](https://hub.docker.com/){: target="_blank" class="_"} where thousands of people have uploaded useful images: anything from Redis, CouchDB, PostgreSQL to IRC bouncers to Rails app servers to Hadoop to base images for various Linux -distros. The [*registry*](/registry/) also includes an official "standard +distros. The [*registry*](../registry/index.md) also includes an official "standard library" of useful containers maintained by the Docker team. The registry itself is open-source, so anyone can deploy their own registry to store and transfer private containers, for internal server deployments for example. @@ -100,37 +100,15 @@ thousands or even millions of containers. ### How do I connect Docker containers? -Currently the recommended way to connect containers is via the Docker network feature. You can see details of how to [work with Docker networks here](userguide/networking/work-with-networks.md). +Currently the recommended way to connect containers is via the Docker network +feature. You can see details of [how to work with Docker networks](../network/bridge.md). ### How do I run more than one process in a Docker container? This approach is discouraged for most use cases. For maximum efficiency and isolation, each container should address one specific area of concern. However, if you need to run multiple services within a single container, see -[Run multiple services in a container](admin/multi-service_container.md). - -### What platforms does Docker run on? - -Linux: - - - Any distribution running version 3.10+ of the Linux kernel - - Specific instructions are available for most Linux distributions, including - [RHEL](installation/linux/rhel.md), [Ubuntu](installation/linux/ubuntulinux.md), - [Oracle Linux](installation/linux/oracle.md), - [SuSE](installation/linux/suse.md), and many others. - -Microsoft Windows: - - - Windows Server 2016 - - Windows 10 - -Cloud: - - - Amazon EC2 - - Google Compute Engine - - Microsoft Azure - - Rackspace - - Oracle Cloud Infrastructure +[Run multiple services in a container](../config/containers/multi-service_container.md). ### How do I report a security issue with Docker? @@ -245,11 +223,8 @@ You need to tell Docker to talk to that machine. You can do this with the You can find more answers on: -- [Docker user mailinglist](https://groups.google.com/d/forum/docker-user){: target="_blank" class="_"} -- [Docker developer mailinglist](https://groups.google.com/d/forum/docker-dev){: target="_blank" class="_"} -- [IRC, docker on freenode](irc://chat.freenode.net#docker) +- [Docker community Slack channel](http://dockr.ly/slack) +- [Docker Support Forums](https://forums.docker.com) - [GitHub](https://github.com/moby/moby){: target="_blank" class="_"} - [Ask questions on Stackoverflow](http://stackoverflow.com/search?q=docker){: target="_blank" class="_"} - [Join the conversation on Twitter](http://twitter.com/docker){: target="_blank" class="_"} - -Looking for something else to read? Checkout the [User Guide](userguide/index.md). diff --git a/engine/index.md b/engine/index.md index 5678b73da99e..d63e4ebf1438 100644 --- a/engine/index.md +++ b/engine/index.md @@ -23,12 +23,12 @@ daemon through scripting or direct CLI commands. Many other Docker applications use the underlying API and CLI. The daemon creates and manage Docker objects, such as images, containers, networks, and volumes. -For more details, see [Docker Architecture](/get-started/overview.md#docker-architecture). +For more details, see [Docker Architecture](../get-started/overview.md#docker-architecture). ## Docker user guide To learn about Docker in more detail and to answer questions about usage and -implementation, check out the [overview page in "get started"](/get-started/overview.md). +implementation, check out the [overview page in "get started"](../get-started/overview.md). ## Installation guides diff --git a/engine/install/binaries.md b/engine/install/binaries.md index 290b093633a6..61715c4a641b 100644 --- a/engine/install/binaries.md +++ b/engine/install/binaries.md @@ -69,10 +69,10 @@ instructions for enabling and configuring AppArmor or SELinux. ##### Docker daemon considerations - Enable `seccomp` security profiles if possible. See - [Enabling `seccomp` for Docker](/engine/security/seccomp.md). + [Enabling `seccomp` for Docker](../security/seccomp.md). - Enable user namespaces if possible. See the - [Daemon user namespace options](/engine/reference/commandline/dockerd.md#daemon-user-namespace-options). + [Daemon user namespace options](/engine/reference/commandline/dockerd/#daemon-user-namespace-options). ### Install static binaries @@ -164,5 +164,5 @@ version. ## Next steps - Continue to [Post-installation steps for Linux](linux-postinstall.md). -- Take a look at the [Get started](/get-started/index.md) training modules to learn how to build an image and run it as a containerized application. -- Review the topics in [Develop with Docker](/develop/index.md) to learn how to build new applications using Docker. +- Take a look at the [Get started](../../get-started/index.md) training modules to learn how to build an image and run it as a containerized application. +- Review the topics in [Develop with Docker](../../develop/index.md) to learn how to build new applications using Docker. diff --git a/engine/install/centos.md b/engine/install/centos.md index 5c5791955ccb..9a8a667f2457 100644 --- a/engine/install/centos.md +++ b/engine/install/centos.md @@ -262,4 +262,4 @@ You must delete any edited configuration files manually. ## Next steps - Continue to [Post-installation steps for Linux](linux-postinstall.md). -- Review the topics in [Develop with Docker](/develop/index.md) to learn how to build new applications using Docker. +- Review the topics in [Develop with Docker](../../develop/index.md) to learn how to build new applications using Docker. diff --git a/engine/install/debian.md b/engine/install/debian.md index 1260033d4571..30cff461fa2f 100644 --- a/engine/install/debian.md +++ b/engine/install/debian.md @@ -287,4 +287,4 @@ You must delete any edited configuration files manually. ## Next steps - Continue to [Post-installation steps for Linux](linux-postinstall.md). -- Review the topics in [Develop with Docker](/develop/index.md) to learn how to build new applications using Docker. +- Review the topics in [Develop with Docker](../../develop/index.md) to learn how to build new applications using Docker. diff --git a/engine/install/fedora.md b/engine/install/fedora.md index af72dbd0fc39..fc8ccd69d650 100644 --- a/engine/install/fedora.md +++ b/engine/install/fedora.md @@ -269,4 +269,4 @@ You must delete any edited configuration files manually. ## Next steps - Continue to [Post-installation steps for Linux](linux-postinstall.md). -- Review the topics in [Develop with Docker](/develop/index.md) to learn how to build new applications using Docker. +- Review the topics in [Develop with Docker](../../develop/index.md) to learn how to build new applications using Docker. diff --git a/engine/install/index.md b/engine/install/index.md index e012bd8b935e..7affd6abf8e9 100644 --- a/engine/install/index.md +++ b/engine/install/index.md @@ -21,7 +21,7 @@ toc_max: 2 ## Supported platforms Docker Engine is available on a variety of [Linux platforms](#server), -[macOS](/docker-for-mac/install.md) and [Windows 10](/docker-for-windows/install.md) +[macOS](../../docker-for-mac/install.md) and [Windows 10](../../docker-for-windows/install.md) through Docker Desktop, and as a [static binary installation](binaries.md). Find your preferred operating system below. @@ -29,10 +29,10 @@ your preferred operating system below. {% assign yes = '![yes](/images/green-check.svg){: style="height: 14px; margin: 0 auto"}' %} -| Platform | x86_64 / amd64 | -|:-------------------------------------------------------------|:-------------------------------------------:| -| [Docker Desktop for Mac (macOS)](/docker-for-mac/install.md) | [{{ yes }}](/docker-for-mac/install.md) | -| [Docker Desktop for Windows](/docker-for-windows/install.md) | [{{ yes }}](/docker-for-windows/install.md) | +| Platform | x86_64 / amd64 | +|:------------------------------------------------------------------|:------------------------------------------------:| +| [Docker Desktop for Mac (macOS)](../../docker-for-mac/install.md) | [{{ yes }}](../../docker-for-mac/install.md) | +| [Docker Desktop for Windows](../../docker-for-windows/install.md) | [{{ yes }}](../../docker-for-windows/install.md) | #### Server @@ -159,4 +159,4 @@ for it. ## Get started After setting up Docker, you can learn the basics with -[Getting started with Docker](/get-started/index.md). +[Getting started with Docker](../../get-started/index.md). diff --git a/engine/install/linux-postinstall.md b/engine/install/linux-postinstall.md index a30d0a50d2bf..4f84b382dbbf 100644 --- a/engine/install/linux-postinstall.md +++ b/engine/install/linux-postinstall.md @@ -25,13 +25,13 @@ creates a Unix socket accessible by members of the `docker` group. > > The `docker` group grants privileges equivalent to the `root` > user. For details on how this impacts security in your system, see -> [*Docker Daemon Attack Surface*](/engine/security/security.md#docker-daemon-attack-surface). +> [*Docker Daemon Attack Surface*](../security/security.md#docker-daemon-attack-surface). {: .warning} > **Note**: > > To run Docker without root privileges, see -> [Run the Docker daemon as a non-root user (Rootless mode)](/engine/security/rootless.md). +> [Run the Docker daemon as a non-root user (Rootless mode)](../security/rootless.md). > > Rootless mode is currently available as an experimental feature. @@ -110,7 +110,7 @@ $ sudo systemctl disable docker If you need to add an HTTP Proxy, set a different directory or partition for the Docker runtime files, or make other customizations, see -[customize your systemd Docker daemon options](/engine/admin/systemd.md). +[customize your systemd Docker daemon options](../../config/daemon/systemd.md). ### `upstart` @@ -130,13 +130,13 @@ $ sudo chkconfig docker on ## Use a different storage engine For information about the different storage engines, see -[Storage drivers](/engine/userguide/storagedriver/imagesandcontainers.md). +[Storage drivers](../../storage/storagedriver/index.md). The default storage engine and the list of supported storage engines depend on your host's Linux distribution and available kernel drivers. ## Configure default logging driver -Docker provides the [capability](/config/containers/logging/) to collect and view log data from all containers running on a host via a series of logging drivers. The default logging driver, `json-file`, writes log data to JSON-formatted files on the host filesystem. Over time, these log files expand in size, leading to potential exhaustion of disk resources. To alleviate such issues, either configure an alternative logging driver such as Splunk or Syslog, or [set up log rotation](/config/containers/logging/configure/#configure-the-default-logging-driver) for the default driver. If you configure an alternative logging driver, see [Use `docker logs` to read container logs for remote logging drivers](/config/containers/logging/dual-logging/). +Docker provides the [capability](../../config/containers/logging/index.md) to collect and view log data from all containers running on a host via a series of logging drivers. The default logging driver, `json-file`, writes log data to JSON-formatted files on the host filesystem. Over time, these log files expand in size, leading to potential exhaustion of disk resources. To alleviate such issues, either configure an alternative logging driver such as Splunk or Syslog, or [set up log rotation](/config/containers/logging/configure/#configure-the-default-logging-driver) for the default driver. If you configure an alternative logging driver, see [Use `docker logs` to read container logs for remote logging drivers](/config/containers/logging/dual-logging/). ## Configure where the Docker daemon listens for connections @@ -220,7 +220,7 @@ Configuring Docker to accept remote connections can be done with the `docker.ser ## Enable IPv6 on the Docker daemon To enable IPv6 on the Docker daemon, see -[Enable IPv6 support](/config/daemon/ipv6.md). +[Enable IPv6 support](../../config/daemon/ipv6.md). ## Troubleshooting @@ -503,5 +503,5 @@ and a 10% overall performance degradation, even if Docker is not running. ## Next steps -- Take a look at the [Get started](/get-started/index.md) training modules to learn how to build an image and run it as a containerized application. -- Review the topics in [Develop with Docker](/develop/index.md) to learn how to build new applications using Docker. +- Take a look at the [Get started](../../get-started/index.md) training modules to learn how to build an image and run it as a containerized application. +- Review the topics in [Develop with Docker](../../develop/index.md) to learn how to build new applications using Docker. diff --git a/engine/install/ubuntu.md b/engine/install/ubuntu.md index ba8b2aaf7d4d..baa6ba2a38fe 100644 --- a/engine/install/ubuntu.md +++ b/engine/install/ubuntu.md @@ -19,15 +19,6 @@ To get started with Docker Engine on Ubuntu, make sure you ## Prerequisites -### Docker EE customers - -To install Docker Enterprise Edition (Docker EE), go to -[Get Docker EE for Ubuntu](/ee/docker-ee/ubuntu.md) -**instead of this topic**. - -To learn more about Docker EE, see -[Docker Enterprise Edition](https://www.docker.com/enterprise-edition/){: target="_blank" class="_" }. - ### OS requirements To install Docker Engine, you need the 64-bit version of one of these Ubuntu @@ -60,7 +51,7 @@ Docker Engine on Ubuntu supports `overlay2`, `aufs` and `btrfs` storage drivers. Docker Engine uses the `overlay2` storage driver by default. If you need to use `aufs` instead, you need to configure it manually. -See [use the AUFS storage driver](/storage/storagedriver/aufs-driver.md) +See [use the AUFS storage driver](../../storage/storagedriver/aufs-driver.md) ## Installation methods @@ -321,4 +312,4 @@ You must delete any edited configuration files manually. ## Next steps - Continue to [Post-installation steps for Linux](linux-postinstall.md). -- Review the topics in [Develop with Docker](/develop/index.md) to learn how to build new applications using Docker. +- Review the topics in [Develop with Docker](../../develop/index.md) to learn how to build new applications using Docker. diff --git a/engine/reference/commandline/config.md b/engine/reference/commandline/config.md index 717b992eea74..9708e4fe9cca 100644 --- a/engine/reference/commandline/config.md +++ b/engine/reference/commandline/config.md @@ -18,4 +18,4 @@ https://github.com/docker/cli ## More info -[Store configuration data using Docker Configs](/engine/swarm/configs.md) +[Store configuration data using Docker Configs](../../swarm/configs.md) diff --git a/engine/reference/commandline/info.md b/engine/reference/commandline/info.md index 7fb5c433ac0a..62defdbc91f2 100644 --- a/engine/reference/commandline/info.md +++ b/engine/reference/commandline/info.md @@ -29,6 +29,6 @@ WARNING: No swap limit support ``` You can ignore these warnings unless you actually need the ability to -[limit these resources](/engine/admin/resource_constraints.md), in which case you +[limit these resources](../../../config/containers/resource_constraints.md), in which case you should consult your operating system's documentation for enabling them. -[Learn more](/engine/installation/linux/linux-postinstall.md#your-kernel-does-not-support-cgroup-swap-limit-capabilities). +[Learn more](../../install/linux-postinstall.md#your-kernel-does-not-support-cgroup-swap-limit-capabilities). diff --git a/engine/security/seccomp.md b/engine/security/seccomp.md index c54bf0d7ab33..762b872162dd 100644 --- a/engine/security/seccomp.md +++ b/engine/security/seccomp.md @@ -20,7 +20,7 @@ CONFIG_SECCOMP=y > **Note**: `seccomp` profiles require seccomp 2.2.1 which is not available on > Ubuntu 14.04, Debian Wheezy, or Debian Jessie. To use `seccomp` on these -> distributions, you must download the [latest static Linux binaries](/engine/installation/linux/docker-ce/binaries.md) +> distributions, you must download the [latest static Linux binaries](../install/binaries.md) > (rather than packages). ## Pass a profile for a container diff --git a/engine/security/security.md b/engine/security/security.md index c451d61d6d6b..888526dd3195 100644 --- a/engine/security/security.md +++ b/engine/security/security.md @@ -35,7 +35,7 @@ of another container. Of course, if the host system is setup accordingly, containers can interact with each other through their respective network interfaces — just like they can interact with external hosts. When you specify public ports for your containers or use -[*links*](../userguide/networking/default_network/dockerlinks.md) +[*links*](../../network/links.md) then IP traffic is allowed between containers. They can ping each other, send/receive UDP packets, and establish TCP connections, but that can be restricted if necessary. From a network architecture point of view, all @@ -220,7 +220,7 @@ This feature provides more insight to administrators than previously available w the CLI for enforcing and performing image signature verification. For more information on configuring Docker Content Trust Signature Verificiation, go to -[Content trust in Docker](../security/trust/content_trust). +[Content trust in Docker](trust/content_trust.md). ## Other kernel security features @@ -275,8 +275,8 @@ pull requests, or comments on the Docker community forums. ## Related information -* [Use trusted images](../security/trust/index.md) -* [Seccomp security profiles for Docker](../security/seccomp.md) -* [AppArmor security profiles for Docker](../security/apparmor.md) +* [Use trusted images](trust/index.md) +* [Seccomp security profiles for Docker](seccomp.md) +* [AppArmor security profiles for Docker](apparmor.md) * [On the Security of Containers (2014)](https://medium.com/@ewindisch/on-the-security-of-containers-2c60ffe25a9e) -* [Docker swarm mode overlay network security model](../userguide/networking/overlay-security-model.md) +* [Docker swarm mode overlay network security model](../../network/overlay.md) diff --git a/engine/security/trust/content_trust.md b/engine/security/trust/content_trust.md index c30ec8f15a90..4f1cbf9fea65 100644 --- a/engine/security/trust/content_trust.md +++ b/engine/security/trust/content_trust.md @@ -237,7 +237,7 @@ Engine Signature Verification prevents the following: > **Note:** > The implicit pulls and runs performed by worker -> nodes for a [Swarm service](/engine/swarm/services.md) on `$ docker service create` and +> nodes for a [Swarm service](../../swarm/services.md) on `$ docker service create` and > `$ docker service update` are also verified. Tag resolution of services > requires that all nodes in the Swarm including managers have content trust > enabled and similarly configured. diff --git a/engine/security/trust/deploying_notary.md b/engine/security/trust/deploying_notary.md index 8303a8653a80..4962deb98950 100644 --- a/engine/security/trust/deploying_notary.md +++ b/engine/security/trust/deploying_notary.md @@ -4,7 +4,7 @@ keywords: trust, security, notary, deployment title: Deploy Notary Server with Compose --- -The easiest way to deploy Notary Server is by using Docker Compose. To follow the procedure on this page, you must have already [installed Docker Compose](/compose/install.md). +The easiest way to deploy Notary Server is by using Docker Compose. To follow the procedure on this page, you must have already [installed Docker Compose](../../../compose/install.md). 1. Clone the Notary repository. @@ -15,7 +15,7 @@ The easiest way to deploy Notary Server is by using Docker Compose. To follow th docker-compose up -d - For more detailed documentation about how to deploy Notary Server, see the [instructions to run a Notary service](/notary/running_a_service.md) as well as [the Notary repository](https://github.com/theupdateframework/notary) for more information. + For more detailed documentation about how to deploy Notary Server, see the [instructions to run a Notary service](../../../notary/running_a_service.md) as well as [the Notary repository](https://github.com/theupdateframework/notary) for more information. 3. Make sure that your Docker or Notary client trusts Notary Server's certificate before you try to interact with the Notary server. See the instructions for [Docker](../../reference/commandline/cli.md#notary) or diff --git a/engine/security/trust/trust_automation.md b/engine/security/trust/trust_automation.md index efe69e1c2cd8..78d939400a9b 100644 --- a/engine/security/trust/trust_automation.md +++ b/engine/security/trust/trust_automation.md @@ -12,7 +12,7 @@ This guide follows the steps as described [here](content_trust/#signing-images-with-docker-content-trust) so please read that and understand its prerequisites. -When working directly with the Notary client, it uses its [own set of environment variables](/notary/reference/client-config.md#environment-variables-optional). +When working directly with the Notary client, it uses its [own set of environment variables](../../../notary/reference/client-config.md#environment-variables-optional). ## Add a delegation private key diff --git a/engine/security/trust/trust_delegation.md b/engine/security/trust/trust_delegation.md index b2f03e0d0e06..242776e961e1 100644 --- a/engine/security/trust/trust_delegation.md +++ b/engine/security/trust/trust_delegation.md @@ -74,10 +74,6 @@ you are not authorized to perform this operation: server returned 401. Failed to add signer to: dtr.example.com/user/repo ``` -If you are using DTR and would like to work with a remote UCP's signing policy, -you must [register your DTR instance with that remote UCP](/ee/dtr/user/manage-images/sign-images/trust-with-remote-ucp/#registering-dtr-with-a-remote-universal-control-plane). -See [Using Docker Content Trust with a Remote UCP Cluster](/ee/dtr/user/manage-images/sign-images/trust-with-remote-ucp/) for more details. - ## Configuring the Notary Client Some of the more advanced features of DCT require the Notary CLI. To install and @@ -88,7 +84,7 @@ and ensure that it is available on your path. 2) Create a configuration file at `~/.notary/config.json` with the following content: -``` +```json { "trust_dir" : "~/.docker/trust", "remote_server": { @@ -108,8 +104,7 @@ Docker Content Trust use cases, refer to the Notary CLI documentation A prerequisite to adding your first contributor is a pair of delegation keys. These keys can either be generated locally using `$ docker trust`, generated by -a certificate authority, or can be taken from a Universal Control Plane's -[Client Bundle](ee/ucp/user-access/cli/#download-client-certificates). +a certificate authority. ### Using Docker Trust to Generate Keys @@ -117,8 +112,9 @@ Docker trust has a built-in generator for a delegation key pair, `$ docker trust generate `. Running this command will automatically load the delegation private key in to the local Docker trust store. -``` +```bash $ docker trust key generate jeff + Generating key for jeff... Enter passphrase for new jeff key with ID 9deed25: Repeat passphrase for new jeff key with ID 9deed25: @@ -134,13 +130,13 @@ cfssl along with a local or company-wide Certificate Authority. Here is an example of how to generate a 2048-bit RSA portion key (all RSA keys must be at least 2048 bits): -``` +```bash $ openssl genrsa -out delegation.key 2048 + Generating RSA private key, 2048 bit long modulus ....................................................+++ ............+++ e is 65537 (0x10001) - ``` They should keep `delegation.key` private because it is used to sign tags. @@ -149,7 +145,7 @@ Then they need to generate an x509 certificate containing the public key, which what you need from them. Here is the command to generate a CSR (certificate signing request): -``` +```bash $ openssl req -new -sha256 -key delegation.key -out delegation.csr ``` @@ -157,7 +153,7 @@ Then they can send it to whichever CA you trust to sign certificates, or they can self-sign the certificate (in this example, creating a certificate that is valid for 1 year): -``` +```bash $ openssl x509 -req -sha256 -days 365 -in delegation.csr -signkey delegation.key -out delegation.crt ``` @@ -166,43 +162,21 @@ by a CA. Finally you will need to add the private key into your local Docker trust store. -``` +```bash $ docker trust key load delegation.key --name jeff + Loading key from "delegation.key"... Enter passphrase for new jeff key with ID 8ae710e: Repeat passphrase for new jeff key with ID 8ae710e: Successfully imported key from delegation.key ``` -### Using Universal Control Plane's Client Bundles - -Universal Control Plane (UCP) manages CLI and API access to its clusters through -certificates generated in a Client Bundle. These certificates and keys can be -used as a delegation key pair. Within each client bundle there is a unique -private key (`key.pem`) and x509 certificate containing a public key -(`cert.pem`). - -1) Download a user's client bundle from the -[Universal Control Plane](ee/ucp/user-access/cli/#download-client-certificates). - -2) Extract the client bundle into your current directory - -3) Load the private key into your local Docker trust store - -``` -$ docker trust key load key.pem --name jeff -Loading key from "key.pem"... -Enter passphrase for new jeff key with ID 9deed25: -Repeat passphrase for new jeff key with ID 9deed25: -Successfully imported key from key.pem -``` - ### Viewing local Delegation keys To list the keys that have been imported in to the local Docker trust store we can use the Notary CLI. -``` +```bash $ notary key list ROLE GUN KEY ID LOCATION @@ -217,13 +191,13 @@ When the first Delegation is added to the Notary Server using `$ docker trust`, we automatically initiate trust data for the repository. This includes creating the notary target and snapshots keys, and rotating the snapshot key to be managed by the notary server. More information on these keys can be found -[here](./trust_key_mng.md) +[here](trust_key_mng.md) When initiating a repository, you will need the key and the passphrase of a local Notary Canonical Root Key. If you have not initiated a repository before, and therefore don't have a Notary root key, `$ docker trust` will create one for you. -> Be sure to protect and back up your [Notary Canonical Root Key](./trust_key_mng.md) +> Be sure to protect and back up your [Notary Canonical Root Key](trust_key_mng.md) ### Initiating the Repository @@ -236,8 +210,9 @@ For DCT the name of the second delegation, in the below example `jeff`, is there to help you keep track of the owner of the keys. In more advanced use cases of Notary additional delegations are used for hierarchy. -``` +```bash $ docker trust signer add --key cert.pem jeff dtr.example.com/admin/demo + Adding signer "jeff" to dtr.example.com/admin/demo... Initializing signed repository for dtr.example.com/admin/demo... Enter passphrase for root key with ID f6c6a4b: @@ -250,7 +225,7 @@ Successfully added signer: jeff to dtr.example.com/admin/demo You can see which keys have been pushed to the Notary server for each repository with the `$ docker trust inspect` command. -``` +```bash $ docker trust inspect --pretty dtr.example.com/admin/demo No signatures for dtr.example.com/admin/demo @@ -270,7 +245,7 @@ Administrative keys for dtr.example.com/admin/demo You could also use the Notary CLI to list delegations and keys. Here you can clearly see the keys were attached to `targets/releases` and `targets/jeff`. -``` +```bash $ notary delegation list dtr.example.com/admin/demo ROLE PATHS KEY IDS THRESHOLD @@ -290,8 +265,9 @@ the `targets/release` role. > Note you will need the passphrase for the repository key; this would have been > configured when you first initiated the repository. -``` +```bash $ docker trust signer add --key ben.pub ben dtr.example.com/admin/demo + Adding signer "ben" to dtr.example.com/admin/demo... Enter passphrase for repository key with ID b0014f8: Successfully added signer: ben to dtr.example.com/admin/demo @@ -299,7 +275,7 @@ Successfully added signer: ben to dtr.example.com/admin/demo Check to prove that there are now 2 delegations (Signer). -``` +```bash $ docker trust inspect --pretty dtr.example.com/admin/demo No signatures for dtr.example.com/admin/demo @@ -326,8 +302,9 @@ will automatically handle adding this new key to `targets/releases`. > Note you will need the passphrase for the repository key; this would have been > configured when you first initiated the repository. -``` +```bash $ docker trust signer add --key cert2.pem jeff dtr.example.com/admin/demo + Adding signer "jeff" to dtr.example.com/admin/demo... Enter passphrase for repository key with ID b0014f8: Successfully added signer: jeff to dtr.example.com/admin/demo @@ -335,7 +312,7 @@ Successfully added signer: jeff to dtr.example.com/admin/demo Check to prove that the delegation (Signer) now contains multiple Key IDs. -``` +```bash $ docker trust inspect --pretty dtr.example.com/admin/demo No signatures for dtr.example.com/admin/demo @@ -361,7 +338,7 @@ attached to the `targets/releases` role, you can use the > Note tags that were signed by the removed delegation will need to be resigned > by an active delegation -``` +```bash $ docker trust signer remove dtr.example.com/admin/demo Removing signer "ben" from dtr.example.com/admin/demo... Enter passphrase for repository key with ID b0014f8: @@ -374,7 +351,7 @@ Successfully removed ben from dtr.example.com/admin/demo will need to add additional delegations using `docker trust signer add` before resigning images. -``` +```console WARN[0000] role targets/releases has fewer keys than its threshold of 1; it will not be usable until keys are added to it ``` @@ -382,13 +359,13 @@ WARN[0000] role targets/releases has fewer keys than its threshold of 1; it will message that there are no valid signatures in `targest/releases`, you will need to resign the `targets/releases` delegation file with the Notary CLI. -``` +```console WARN[0000] Error getting targets/releases: valid signatures did not meet threshold for targets/releases ``` Resigning the delegation file is done with the `$ notary witness` command -``` +```bash $ notary witness dtr.example.com/admin/demo targets/releases --publish ``` @@ -405,7 +382,7 @@ and the role specific to that signer `targets/`. 1) We will need to grab the Key ID from the Notary Server -``` +```bash $ notary delegation list dtr.example.com/admin/demo ROLE PATHS KEY IDS THRESHOLD @@ -418,8 +395,9 @@ targets/releases "" 8fb597cbaf196f0781628b2f52bff6b3912e4e8075 2) Remove from the `targets/releases` delegation -``` +```bash $ notary delegation remove dtr.example.com/admin/demo targets/targets 1091060d7bfd938dfa5be703fa057974f9322a4faef6f580334f3d6df44c02d1 --publish + Auto-publishing changes to dtr.example.com/admin/demo Enter username: admin Enter password: @@ -429,7 +407,7 @@ Successfully published changes for repository dtr.example.com/admin/demo 3) Remove from the `targets/` delegation -``` +```bash $ notary delegation remove dtr.example.com/admin/demo targets/jeff 1091060d7bfd938dfa5be703fa057974f9322a4faef6f580334f3d6df44c02d1 --publish Removal of delegation role targets/jeff with keys [5570b88df0736c468493247a07e235e35cf3641270c944d0e9e8899922fc6f99], to repository "dtr.example.com/admin/demo" staged for next publish. @@ -443,7 +421,7 @@ Successfully published changes for repository dtr.example.com/admin/demo 4) Check the remaining delegation list -``` +```bash $ notary delegation list dtr.example.com/admin/demo ROLE PATHS KEY IDS THRESHOLD @@ -460,7 +438,7 @@ the `$ notary key remove` command. 1) We will need to get the Key ID from the local Docker Trust store -``` +```bash $ notary key list ROLE GUN KEY ID LOCATION @@ -473,7 +451,7 @@ targets ...example.com/admin/demo c819f2eda8fba2810ec6a7f95f051c90276c87fd 2) Remove the key from the local Docker Trust store -``` +```bash $ notary key remove 1091060d7bfd938dfa5be703fa057974f9322a4faef6f580334f3d6df44c02d1 Are you sure you want to remove 1091060d7bfd938dfa5be703fa057974f9322a4faef6f580334f3d6df44c02d1 (role jeff) from /home/ubuntu/.docker/trust/private? (yes/no) y @@ -489,14 +467,16 @@ snapshot and all delegations keys using the Notary CLI. This is often required by a container registry before a particular repository can be deleted. -``` +```bash $ notary delete dtr.example.com/admin/demo --remote + Deleting trust data for repository dtr.example.com/admin/demo Enter username: admin Enter password: Successfully deleted local and remote trust data for repository dtr.example.com/admin/demo $ docker trust inspect --pretty dtr.example.com/admin/demo + No signatures or cannot access dtr.example.com/admin/demo ``` @@ -506,4 +486,3 @@ No signatures or cannot access dtr.example.com/admin/demo * [Manage keys for content trust](trust_key_mng.md) * [Automation with content trust](trust_automation.md) * [Play in a content trust sandbox](trust_sandbox.md) -* [Using Docker Content Trust with a Remote UCP Cluster](/ee/dtr/user/manage-images/sign-images/trust-with-remote-ucp.md) diff --git a/engine/security/trust/trust_key_mng.md b/engine/security/trust/trust_key_mng.md index 3a4189070cd3..560bf932364b 100644 --- a/engine/security/trust/trust_key_mng.md +++ b/engine/security/trust/trust_key_mng.md @@ -31,7 +31,7 @@ workflow. They need to be **Note**: Prior to Docker Engine 1.11, the snapshot key was also generated and stored locally client-side. -Use the Notary CLI to [manage your snapshot key locally again](/notary/advanced_usage.md#rotate-keys) +Use the Notary CLI to [manage your snapshot key locally again](../../../notary/advanced_usage.md#rotate-keys) for repositories created with newer versions of Docker. ## Choose a passphrase @@ -64,7 +64,7 @@ Docker Content Trust can store and sign with root keys from a Yubikey 4. The Yubikey is prioritized over keys stored in the filesystem. When you initialize a new repository with content trust, Docker Engine looks for a root key locally. If a key is not found and the Yubikey 4 exists, Docker Engine creates a root key in the -Yubikey 4. Consult the [Notary documentation](/notary/advanced_usage.md#use-a-yubikey) +Yubikey 4. Consult the [Notary documentation](../../../notary/advanced_usage.md#use-a-yubikey) for more details. Prior to Docker Engine 1.11, this feature was only in the experimental branch. diff --git a/engine/security/trust/trust_sandbox.md b/engine/security/trust/trust_sandbox.md index 37d5ea4e84ae..2f3eb89ad15a 100644 --- a/engine/security/trust/trust_sandbox.md +++ b/engine/security/trust/trust_sandbox.md @@ -21,9 +21,9 @@ have privileges to run docker commands on your local machine or in the VM. This sandbox requires you to install two Docker tools: Docker Engine >= 1.10.0 and Docker Compose >= 1.6.0. To install the Docker Engine, choose from the -[list of supported platforms](../../installation/index.md). To install +[list of supported platforms](../../install/index.md). To install Docker Compose, see the -[detailed instructions here](/compose/install/). +[detailed instructions here](../../../compose/install.md). ## What is in the sandbox? diff --git a/engine/swarm/admin_guide.md b/engine/swarm/admin_guide.md index 56d996ee7deb..275ba27b3edb 100644 --- a/engine/swarm/admin_guide.md +++ b/engine/swarm/admin_guide.md @@ -11,13 +11,13 @@ for managing the swarm and storing the swarm state. It is important to understand some key features of manager nodes to properly deploy and maintain the swarm. -Refer to [How nodes work](/engine/swarm/how-swarm-mode-works/nodes.md) +Refer to [How nodes work](how-swarm-mode-works/nodes.md) for a brief overview of Docker Swarm mode and the difference between manager and worker nodes. ## Operate manager nodes in a swarm -Swarm manager nodes use the [Raft Consensus Algorithm](/engine/swarm/raft.md) to manage the +Swarm manager nodes use the [Raft Consensus Algorithm](raft.md) to manage the swarm state. You only need to understand some general concepts of Raft in order to manage a swarm. @@ -54,7 +54,7 @@ troubleshooting steps if you do lose the quorum of managers. When initiating a swarm, you must specify the `--advertise-addr` flag to advertise your address to other manager nodes in the swarm. For more -information, see [Run Docker Engine in swarm mode](/engine/swarm/swarm-mode.md#configure-the-advertise-address). Because manager nodes are +information, see [Run Docker Engine in swarm mode](swarm-mode.md#configure-the-advertise-address). Because manager nodes are meant to be a stable component of the infrastructure, you should use a *fixed IP address* for the advertise address to prevent the swarm from becoming unstable on machine reboot. @@ -99,7 +99,7 @@ swarm becomes unavailable until you reboot the node or restart with `--force-new-cluster`. You manage swarm membership with the `docker swarm` and `docker node` -subsystems. Refer to [Add nodes to a swarm](/engine/swarm/join-nodes.md) for more information +subsystems. Refer to [Add nodes to a swarm](join-nodes.md) for more information on how to add worker nodes and promote a worker node to be a manager. ### Distribute manager nodes @@ -143,7 +143,7 @@ assigning tasks to the node. ## Add worker nodes for load balancing -[Add nodes to the swarm](/engine/swarm/join-nodes.md) to balance your swarm's +[Add nodes to the swarm](join-nodes.md) to balance your swarm's load. Replicated service tasks are distributed across the swarm as evenly as possible over time, as long as the worker nodes are matched to the requirements of the services. When limiting a service to run on only specific types of nodes, @@ -213,7 +213,7 @@ To cleanly re-join a manager node to a cluster: 3. Re-join the node to the swarm with a fresh state using `docker swarm join`. For more information on joining a manager node to a swarm, refer to -[Join nodes to a swarm](/engine/swarm/join-nodes.md). +[Join nodes to a swarm](join-nodes.md). ## Forcibly remove a node @@ -248,7 +248,7 @@ You can back up the swarm using any manager. Use the following procedure. 1. If the swarm has auto-lock enabled, you need the unlock key to restore the swarm from backup. Retrieve the unlock key if necessary and store it in a safe location. If you are unsure, read - [Lock your swarm to protect its encryption key](/engine/swarm/swarm_manager_locking.md). + [Lock your swarm to protect its encryption key](swarm_manager_locking.md). 2. Stop Docker on the manager before backing up the data, so that no data is being changed during the backup. It is possible to take a backup while the @@ -315,7 +315,7 @@ restore the data to a new swarm. `docker service ls` to be sure that all expected services are present. 7. If you use auto-lock, - [rotate the unlock key](/engine/swarm/swarm_manager_locking.md#rotate-the-unlock-key). + [rotate the unlock key](swarm_manager_locking.md#rotate-the-unlock-key). 8. Add manager and worker nodes to bring your new swarm up to operating capacity. @@ -385,7 +385,7 @@ In Docker 1.13 and higher, you can use the `--force` or `-f` flag with the `docker service update` command to force the service to redistribute its tasks across the available worker nodes. This causes the service tasks to restart. Client applications may be disrupted. If you have configured it, your service -uses a [rolling update](/engine/swarm/swarm-tutorial/rolling-update.md). +uses a [rolling update](swarm-tutorial/rolling-update.md). If you use an earlier version and you want to achieve an even balance of load across workers and don't mind disrupting running tasks, you can force your swarm @@ -401,5 +401,5 @@ down to the original scale. You can use `docker service ps` to assess the curren balance of your service across nodes. See also -[`docker service scale`](/engine/reference/commandline/service_scale.md) and -[`docker service ps`](/engine/reference/commandline/service_ps.md). +[`docker service scale`](../reference/commandline/service_scale.md) and +[`docker service ps`](../reference/commandline/service_ps.md). diff --git a/engine/swarm/configs.md b/engine/swarm/configs.md index 1deaa1261f7e..1ebd156ac960 100644 --- a/engine/swarm/configs.md +++ b/engine/swarm/configs.md @@ -112,10 +112,10 @@ those remaining after a `docker service update --config-rm`. Use these links to read about specific commands, or continue to the [example about using configs with a service](#advanced-example-use-configs-with-a-nginx-service). -- [`docker config create`](/engine/reference/commandline/config_create.md) -- [`docker config inspect`](/engine/reference/commandline/config_inspect.md) -- [`docker config ls`](/engine/reference/commandline/config_ls.md) -- [`docker config rm`](/engine/reference/commandline/config_rm.md) +- [`docker config create`](../reference/commandline/config_create.md) +- [`docker config inspect`](../reference/commandline/config_inspect.md) +- [`docker config ls`](../reference/commandline/config_ls.md) +- [`docker config rm`](../reference/commandline/config_rm.md) ## Examples @@ -130,7 +130,7 @@ Docker configs. The `docker stack` command supports defining configs in a Compose file. However, the `configs` key is not supported for `docker compose`. See -[the Compose file reference](/compose/compose-file/index.md#configs) for details. +[the Compose file reference](../../compose/compose-file/index.md#configs) for details. ### Simple example: Get started with configs diff --git a/engine/swarm/how-swarm-mode-works/nodes.md b/engine/swarm/how-swarm-mode-works/nodes.md index 268ec6ad0276..cfff0e2e0c45 100644 --- a/engine/swarm/how-swarm-mode-works/nodes.md +++ b/engine/swarm/how-swarm-mode-works/nodes.md @@ -17,8 +17,8 @@ There are two types of nodes: [**managers**](#manager-nodes) and ![Swarm mode cluster](/engine/swarm/images/swarm-diagram.png) If you haven't already, read through the -[swarm mode overview](/engine/swarm/index.md) and -[key concepts](/engine/swarm/key-concepts.md). +[swarm mode overview](../index.md) and +[key concepts](../key-concepts.md). ## Manager nodes @@ -26,7 +26,7 @@ Manager nodes handle cluster management tasks: * maintaining cluster state * scheduling services -* serving swarm mode [HTTP API endpoints](/engine/api/index.md) +* serving swarm mode [HTTP API endpoints](../../api/index.md) Using a [Raft](https://raft.github.io/raft.pdf) implementation, the managers maintain a consistent internal state of the entire swarm and all the services @@ -66,17 +66,17 @@ gracefully stops tasks on nodes in `Drain` mode and schedules the tasks on an `Active` node. The scheduler does not assign new tasks to nodes with `Drain` availability. -Refer to the [`docker node update`](/engine/reference/commandline/node_update.md) +Refer to the [`docker node update`](../../reference/commandline/node_update.md) command line reference to see how to change node availability. ## Change roles You can promote a worker node to be a manager by running `docker node promote`. For example, you may want to promote a worker node when you -take a manager node offline for maintenance. See [node promote](/engine/reference/commandline/node_promote.md). +take a manager node offline for maintenance. See [node promote](../../reference/commandline/node_promote.md). You can also demote a manager node to a worker node. See -[node demote](/engine/reference/commandline/node_demote.md). +[node demote](../../reference/commandline/node_demote.md). ## Learn more diff --git a/engine/swarm/how-swarm-mode-works/pki.md b/engine/swarm/how-swarm-mode-works/pki.md index ed7b441c36f4..5018322cae5b 100644 --- a/engine/swarm/how-swarm-mode-works/pki.md +++ b/engine/swarm/how-swarm-mode-works/pki.md @@ -14,7 +14,7 @@ as a manager node. By default, the manager node generates a new root Certificate Authority (CA) along with a key pair, which are used to secure communications with other nodes that join the swarm. If you prefer, you can specify your own externally-generated root CA, using the `--external-ca` flag of the -[docker swarm init](/engine/reference/commandline/swarm_init.md) command. +[docker swarm init](../../reference/commandline/swarm_init.md) command. The manager node also generates two tokens to use when you join additional nodes to the swarm: one **worker token** and one **manager token**. Each token @@ -55,7 +55,7 @@ By default, each node in the swarm renews its certificate every three months. You can configure this interval by running the `docker swarm update --cert-expiry