From 7fed5214ccfebec7da9e739dc6a4e5becde664bf Mon Sep 17 00:00:00 2001 From: Ralph Bisschops Date: Thu, 27 May 2021 10:07:04 +0000 Subject: [PATCH 01/79] Add comments to `wait-for-postgres.sh` Add additional comment to explain code --- compose/startup-order.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/compose/startup-order.md b/compose/startup-order.md index a9b1a5e0812f..e432ee181086 100644 --- a/compose/startup-order.md +++ b/compose/startup-order.md @@ -68,14 +68,25 @@ script: set -e host="$1" + # Shift arguments with mapping: + # - $0 => $0 + # - $1 => + # - $2 => $1 + # - $3 => $2 + # - ... + # This is done for `exec "$@"` below to work correctly shift + # Login for user (`-U`) and once logged in execute quit ( `-c \q` ) + # If we can not login sleep for 1 sec until PGPASSWORD=$POSTGRES_PASSWORD psql -h "$host" -U "postgres" -c '\q'; do >&2 echo "Postgres is unavailable - sleeping" sleep 1 done >&2 echo "Postgres is up - executing command" + # Print and execute all other arguments starting with `$1` + # So `exec "$1" "$2" "$3" ...` exec "$@" ``` From 41114e2f930fd3a78cfe7e74eeb21d787ff48bb1 Mon Sep 17 00:00:00 2001 From: craig-osterhout Date: Thu, 29 Sep 2022 16:13:54 -0700 Subject: [PATCH 02/79] Remove redirects for samples --- _samples/library/adminer.md | 2 -- _samples/library/elasticsearch.md | 2 -- _samples/library/mariadb.md | 2 -- _samples/library/mysql.md | 2 -- _samples/library/nextcloud.md | 2 -- _samples/library/nginx.md | 2 -- _samples/library/php.md | 2 -- _samples/library/postgres.md | 2 -- _samples/library/python.md | 2 -- _samples/library/redis.md | 2 -- _samples/library/rust.md | 2 -- _samples/library/traefik.md | 2 -- 12 files changed, 24 deletions(-) diff --git a/_samples/library/adminer.md b/_samples/library/adminer.md index 166de852cf9a..da58ce4de1e0 100644 --- a/_samples/library/adminer.md +++ b/_samples/library/adminer.md @@ -1,5 +1,3 @@ --- redirect_to: https://hub.docker.com/_/adminer/ -redirect_from: -- /samples/adminer/ --- diff --git a/_samples/library/elasticsearch.md b/_samples/library/elasticsearch.md index 602db86a0a26..b825dbe188f8 100644 --- a/_samples/library/elasticsearch.md +++ b/_samples/library/elasticsearch.md @@ -1,5 +1,3 @@ --- redirect_to: https://hub.docker.com/_/elasticsearch/ -redirect_from: -- /samples/elasticsearch/ --- diff --git a/_samples/library/mariadb.md b/_samples/library/mariadb.md index 02204ef1688f..0e7966fd8062 100644 --- a/_samples/library/mariadb.md +++ b/_samples/library/mariadb.md @@ -1,5 +1,3 @@ --- redirect_to: https://hub.docker.com/_/mariadb/ -redirect_from: -- /samples/mariadb/ --- diff --git a/_samples/library/mysql.md b/_samples/library/mysql.md index f867d6c3ffd6..3d0cc4929f18 100644 --- a/_samples/library/mysql.md +++ b/_samples/library/mysql.md @@ -1,5 +1,3 @@ --- redirect_to: https://hub.docker.com/_/mysql/ -redirect_from: -- /samples/mysql/ --- diff --git a/_samples/library/nextcloud.md b/_samples/library/nextcloud.md index b3b2cfb9e82e..c16e32a275b8 100644 --- a/_samples/library/nextcloud.md +++ b/_samples/library/nextcloud.md @@ -1,5 +1,3 @@ --- redirect_to: https://hub.docker.com/_/nextcloud/ -redirect_from: -- /samples/nextcloud/ --- diff --git a/_samples/library/nginx.md b/_samples/library/nginx.md index 6788a81d67e7..797e3fcabc20 100644 --- a/_samples/library/nginx.md +++ b/_samples/library/nginx.md @@ -1,5 +1,3 @@ --- redirect_to: https://hub.docker.com/_/nginx/ -redirect_from: -- /samples/nginx/ --- diff --git a/_samples/library/php.md b/_samples/library/php.md index cecab497d458..136550ae110e 100644 --- a/_samples/library/php.md +++ b/_samples/library/php.md @@ -1,5 +1,3 @@ --- redirect_to: https://hub.docker.com/_/php/ -redirect_from: -- /samples/php/ --- diff --git a/_samples/library/postgres.md b/_samples/library/postgres.md index ca4e0f987c95..aff9eed95e20 100644 --- a/_samples/library/postgres.md +++ b/_samples/library/postgres.md @@ -1,5 +1,3 @@ --- redirect_to: https://hub.docker.com/_/postgres/ -redirect_from: -- /samples/postgres/ --- diff --git a/_samples/library/python.md b/_samples/library/python.md index 19ac114ef348..b2c7377cb741 100644 --- a/_samples/library/python.md +++ b/_samples/library/python.md @@ -1,5 +1,3 @@ --- redirect_to: https://hub.docker.com/_/python/ -redirect_from: -- /samples/python/ --- diff --git a/_samples/library/redis.md b/_samples/library/redis.md index ca1c13872895..0cb784a54ae4 100644 --- a/_samples/library/redis.md +++ b/_samples/library/redis.md @@ -1,5 +1,3 @@ --- redirect_to: https://hub.docker.com/_/redis/ -redirect_from: -- /samples/redis/ --- diff --git a/_samples/library/rust.md b/_samples/library/rust.md index 879e5b7933e9..aa6cee3267be 100644 --- a/_samples/library/rust.md +++ b/_samples/library/rust.md @@ -1,5 +1,3 @@ --- redirect_to: https://hub.docker.com/_/rust/ -redirect_from: -- /samples/rust/ --- diff --git a/_samples/library/traefik.md b/_samples/library/traefik.md index ec43ca40635b..a13a2fda3e47 100644 --- a/_samples/library/traefik.md +++ b/_samples/library/traefik.md @@ -1,5 +1,3 @@ --- redirect_to: https://hub.docker.com/_/traefik/ -redirect_from: -- /samples/traefik/ --- From 7d1e62e01c6fc1dfe8705590c47c648b695af6fd Mon Sep 17 00:00:00 2001 From: Allie Sadler <102604716+aevesdocker@users.noreply.github.com> Date: Thu, 6 Oct 2022 09:02:56 +0100 Subject: [PATCH 03/79] contribute-addition and toc fix (#15814) * contribute-addition and toc fix * toc addition --- _data/toc.yaml | 2 ++ contribute/components/tables.md | 36 +++++++++++++++++++++++++++++++-- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/_data/toc.yaml b/_data/toc.yaml index a923413a8b39..9a5c297e88ec 100644 --- a/_data/toc.yaml +++ b/_data/toc.yaml @@ -1798,6 +1798,8 @@ contribute: title: Call outs - path: /contribute/components/cards/ title: Cards + - path: /contribute/components/code-blocks/ + title: Code blocks - path: /contribute/components/images/ title: Images - path: /contribute/components/links/ diff --git a/contribute/components/tables.md b/contribute/components/tables.md index 5109ea5d8d47..1049604ae122 100644 --- a/contribute/components/tables.md +++ b/contribute/components/tables.md @@ -6,6 +6,8 @@ toc_max: 3 ## Example +### Basic table + | Permission level | Access | |:-------------------------------------------------------------------------|:-------------------------------------------------------------| | **Bold** or _italic_ within a table cell. Next cell is empty on purpose. | | @@ -14,8 +16,21 @@ toc_max: 3 | Read/Write | Pull, push | | Admin | All of the above, plus update description, create, and delete | +### Feature-support table + +{% assign yes = '![yes](/assets/images/green-check.svg){: .inline style="height: 14px; margin: 0 auto"}' %} + +| Platform | x86_64 / amd64 | +|:------------------------|:-----------------------| +| Ubuntu | {{ yes }} | +| Debian | {{ yes }} | +| Fedora | {{ yes }} | + + ## Markdown +### Basic table + ``` | Permission level | Access | |:-------------------------------------------------------------------------|:-------------------------------------------------------------| @@ -25,7 +40,24 @@ toc_max: 3 | Read/Write | Pull, push | | Admin | All of the above, plus update description, create, and delete | ``` - The alignment of the cells in the source doesn't really matter. The ending pipe character is optional (unless the last cell is supposed to be empty). The header -row and separator row are optional. \ No newline at end of file +row and separator row are optional. + +### Feature-support table + +Before you add the table you need to add: + +{% highlight liquid %} +{% raw %} {% assign yes = '![yes](/assets/images/green-check.svg){% endraw %}{% raw %}{: .inline style="height: 14px; margin: 0 auto"}' %}{% endraw %} +{% endhighlight %} + +``` +| Platform | x86_64 / amd64 | +|:------------------------|:-----------------------| +| Ubuntu | {% raw %}{{ yes }}{% endraw %} | +| Debian | {% raw %}{{ yes }}{% endraw %} | +| Fedora | {% raw %}{{ yes }}{% endraw %} | +``` + + From 876f26421aae7138dbe5a52bb8bbcda6f9878823 Mon Sep 17 00:00:00 2001 From: Guillaume Lours <705411+glours@users.noreply.github.com> Date: Thu, 6 Oct 2022 11:08:46 +0200 Subject: [PATCH 04/79] update Compose release notes page for 2.11.0, 2.11.1 and 2.11.2 releases (#15812) * update Compose release notes page for 2.11.0, 2.11.1 and 2.11.2 releases Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Allie Sadler <102604716+aevesdocker@users.noreply.github.com> * Update compose/release-notes.md Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com> Co-authored-by: Allie Sadler <102604716+aevesdocker@users.noreply.github.com> --- compose/release-notes.md | 71 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/compose/release-notes.md b/compose/release-notes.md index 50031c4c7f4f..599766b81d92 100644 --- a/compose/release-notes.md +++ b/compose/release-notes.md @@ -6,6 +6,75 @@ toc_max: 2 redirect_from: - /release-notes/docker-compose/ --- +## 2.11.2 + +(2002-09-27) + +> **Note** +> +> - Updates on environment file syntax & interpolation: see [compose#9879](https://github.com/docker/compose/issues/9879){:target="_blank" rel="noopener" class="_"} +> - Setting `DOCKER_HOST` via `.env` files is not supported in Compose v2 + +### Bug fixes +- Fixed a bug to prevent "invalid template" errors on valid environment variable values. Fixes [compose##9806](https://github.com/docker/compose/issues/9806){:target="_blank" rel="noopener" class="_"}, [compose##9746](https://github.com/docker/compose/issues/9746){:target="_blank" rel="noopener" class="_"}, [compose##9704](https://github.com/docker/compose/issues/9704){:target="_blank" rel="noopener" class="_"}, [compose##9294](https://github.com/docker/compose/issues/9294){:target="_blank" rel="noopener" class="_"} +- Fixed a bug to ensure new images from `docker compose build` are used. Fixes [compose#9856](https://github.com/docker/compose/issues/9856){:target="_blank" rel="noopener" class="_"} +- Fixed cross-architecture builds when `DOCKER_DEFAULT_PLATFORM` not set. Fixes [compose#9864](https://github.com/docker/compose/pull/9864){:target="_blank" rel="noopener" class="_"} +- Fixed intermittent conflict errors when using `depends_on`. Fixes [compose#9014](https://github.com/docker/compose/issues/9014){:target="_blank" rel="noopener" class="_"} +- Cleared service `CMD` when entry point is overridden. Fixes [compose#9622](https://github.com/docker/compose/issues/9622){:target="_blank" rel="noopener" class="_"} +- Configured default builder export when no `build.platforms` defined. Fixes [compose#9856](https://github.com/docker/compose/issues/9856){:target="_blank" rel="noopener" class="_"} +- Fixed a bug to keep the platform defined, in priority, via DOCKER_DEFAULT_PLATFORM or the `service.platform` attribut. Fixes [compose#9864](https://github.com/docker/compose/issues/9864){:target="_blank" rel="noopener" class="_"} +- Removed support for `DOCKER_HOST` in `.env` files. Fixes [compose#9210](https://github.com/docker/compose/issues/9210){:target="_blank" rel="noopener" class="_"} +- Fixed a bug to ensure clean service command if entry point is overridden in run command. Fixes [compose#9622](https://github.com/docker/compose/issues/9622){:target="_blank" rel="noopener" class="_"} +- Deps: fixed race condition during graph traversal. Fixes [compose#9014](https://github.com/docker/compose/issues/9014){:target="_blank" rel="noopener" class="_"} + +### Changes +- CI now runs on Windows & macOS including E2E tests via Docker Desktop +- Upgraded to compose-go from [1.5.1 to 1.6.0](https://github.com/compose-spec/compose-go/releases/tag/v1.6.0){:target="_blank" rel="noopener" class="_"} +- Added more information when `service.platform` isn't part of `service.build.platforms` +- GitHub Workflows security hardening + + +For the full change log or additional information, check the [Compose repository 2.11.2 release page](https://github.com/docker/compose/releases/tag/v2.11.2){:target="_blank" rel="noopener" class="_"}. + +## 2.11.1 + +(2022-09-20) + +### Bug fixes +- Fixed a bug to keep `depends_on` condition when service has `volumes_from`. Fixes [compose#9843](https://github.com/docker/compose/issues/9843){:target="_blank" rel="noopener" class="_"} +- Fixed a bug to keep the platform defined at service level during build if no build platforms. Fixes [compose#9729](https://github.com/docker/compose/pull/9729#issuecomment-1246748144){:target="_blank" rel="noopener" class="_"} +- Fixed a bug to keep the platform defined via DOCKER_DEFAULT_PLATFORM during build if no build platforms provided. Fixes [compose#9853](https://github.com/docker/compose/issues/9853){:target="_blank" rel="noopener" class="_"} + +For the full change log or additional information, check the [Compose repository 2.11.1 release page](https://github.com/docker/compose/releases/tag/v2.11.1){:target="_blank" rel="noopener" class="_"}. + +## 2.11.0 + +(2022-09-14) + +### Enhancements +- Added platforms build. Fixes [compose-spec#267](https://github.com/compose-spec/compose-spec/pull/267){:target="_blank" rel="noopener" class="_"} + +### Bug fixes +- Logs now filter to services from current Compose file. Fixes [compose#9801](https://github.com/docker/compose/issues/9801){:target="_blank" rel="noopener" class="_"} +- Added an improved output warning when pulling images. Fixes [compose#9820](https://github.com/docker/compose/issues/9820){:target="_blank" rel="noopener" class="_"} +- Fixed a bug to ensure correct capture of exit code when service has dependencies. Fixes [compose#9778](https://github.com/docker/compose/issues/9778){:target="_blank" rel="noopener" class="_"} +- Fixed `down` with `--rmi`. Fixes [compose#9655](https://github.com/docker/compose/issues/9655){:target="_blank" rel="noopener" class="_"} +- Fixed docker-compose convert that turns $ into $$ when using the --no-interpolate option. Fixes [compose#9160](https://github.com/docker/compose/issues/9160){:target="_blank" rel="noopener" class="_"} +- Fixed `build.go` access custom labels directly cause panic. See [compose#9810](https://github.com/docker/compose/pull/9810){:target="_blank" rel="noopener" class="_"} +- Applied newly loaded envvars to "DockerCli" and "APIClient". Fixes [compose#9210](https://github.com/docker/compose/issues/9210){:target="_blank" rel="noopener" class="_"} +- Only attempt to start specified services on `compose start [services]`. Fixes [compose#9796](https://github.com/docker/compose/issues/9796){:target="_blank" rel="noopener" class="_"} [compose#9807](https://github.com/docker/compose/issues/9807){:target="_blank" rel="noopener" class="_"} +- Label built images for reliable cleanup on `down`. Fixes [compose#9655](https://github.com/docker/compose/issues/9655){:target="_blank" rel="noopener" class="_"} + +### Changes +- Dependencies upgrade: bump Golang to 1.19.1 +- Dependencies upgrade: bump github.com/docker/go-units from 0.4.0 to 0.5.0 +- Dependencies upgrade: bump github.com/cnabio/cnab-to-oci from 0.3.6 to 0.3.7 +- Dependencies upgrade: bump go.opentelemetry.io/otel from 1.9.0 to 1.10.0 +- Dependencies upgrade: bump github.com/AlecAivazis/survey/v2 from 2.3.5 +- Dependencies upgrade: bump go.opentelemetry.io/otel from 1.4.1 to 1.9.0 +- Dependencies upgrade: bump compose-go from [1.5.0 to 1.5.1](https://github.com/compose-spec/compose-go/releases/tag/v1.5.1){:target="_blank" rel="noopener" class="_"} + +For the full change log or additional information, check the [Compose repository 2.11.0 release page](https://github.com/docker/compose/releases/tag/v2.11.0){:target="_blank" rel="noopener" class="_"}. ## 2.10.2 @@ -55,7 +124,7 @@ For the full change log or additional information, check the [Compose repository - Updated usage strings for consistency. - Resolved environment variables case-insensitively on Windows. Fixes [compose#9431](https://github.com/docker/compose/issues/9431){:target="_blank" rel="noopener" class="_"}. - Fixed `compose up` so dependency containers aren't stopped when a stop signal is issued. This keeps parity with v1 behavior-wise. -Fixes [compose#9696](https://github.com/docker/compose/issues/9696){:target="_blank" rel="noopener" class="_"}. +- Fixes [compose#9696](https://github.com/docker/compose/issues/9696){:target="_blank" rel="noopener" class="_"}. - Fixed commands that start/restart/pause/unpause so that, if ran from the Compose file, the Compose model is also applied. Fixes [compose#9705](https://github.com/docker/compose/issues/9705){:target="_blank" rel="noopener" class="_"} and [compose#9705](https://github.com/docker/compose/issues/9671){:target="_blank" rel="noopener" class="_"}. - Removed extra whitespaces in help text of some subcommands. - Fixed `compose create` to not override service pull policy when the value from the command line is configured as the default. Fixes [compose#9717](https://github.com/docker/compose/issues/9717){:target="_blank" rel="noopener" class="_"}. From f6a590788e7fe3ced70ea2be5f4bfb533cca81ee Mon Sep 17 00:00:00 2001 From: Allie Sadler <102604716+aevesdocker@users.noreply.github.com> Date: Thu, 6 Oct 2022 12:58:21 +0100 Subject: [PATCH 05/79] remove content repeated elsewhere (#15818) --- desktop/install/linux-install.md | 159 ------------------------------- 1 file changed, 159 deletions(-) diff --git a/desktop/install/linux-install.md b/desktop/install/linux-install.md index c7102e9e04cd..bfcf19d270b9 100644 --- a/desktop/install/linux-install.md +++ b/desktop/install/linux-install.md @@ -136,165 +136,6 @@ Log out and log back in so that your group membership is re-evaluated. For more information, see [Docker Desktop Subscription Service Agreement](https://www.docker.com/legal/docker-subscription-service-agreement). We recommend that you also read the [FAQs](https://www.docker.com/pricing/faq){: target="_blank" rel="noopener" class="_" id="dkr_docs_desktop_install_btl"}. -## Differences between Docker Desktop for Linux and Docker Engine - -Docker Desktop for Linux and Docker Engine can be installed side-by-side on the -same machine. Docker Desktop for Linux stores containers and images in an isolated -storage location [within a VM](linux-install.md#why-docker-desktop-for-linux-runs-a-vm) and offers -controls to restrict [its resources](../settings/linux.md#resources). Using a dedicated storage -location for Docker Desktop prevents it from interfering with a Docker Engine -installation on the same machine. - -While it's possible to run both Docker Desktop and Docker Engine simultaneously, -there may be situations where running both at the same time can cause issues. -For example, when mapping network ports (`-p` / `--publish`) for containers, both -Docker Desktop and Docker Engine may attempt to reserve the same port on your -machine, which can lead to conflicts ("port already in use"). - -We generally recommend stopping the Docker Engine while you're using Docker Desktop -to prevent the Docker Engine from consuming resources and to prevent conflicts -as described above. - -Use the following command to stop the Docker Engine service: - -```console -$ sudo systemctl stop docker docker.socket containerd -``` - -Depending on your installation, the Docker Engine may be configured to automatically -start as a system service when your machine starts. Use the following command to -disable the Docker Engine service, and to prevent it from starting automatically: - -```console -$ sudo systemctl disable docker docker.socket containerd -``` - -### Switch between Docker Desktop and Docker Engine -{: id="context" } - -The Docker CLI can be used to interact with multiple Docker Engines. For example, -you can use the same Docker CLI to control a local Docker Engine and to control -a remote Docker Engine instance running in the cloud. [Docker Contexts](../../engine/context/working-with-contexts.md) -allow you to switch between Docker Engines instances. - -When installing Docker Desktop, a dedicated "desktop-linux" context is created to -interact with Docker Desktop. On startup, Docker Desktop automatically sets its -own context (`desktop-linux`) as the current context. This means that subsequent -Docker CLI commands target Docker Desktop. On shutdown, Docker Desktop resets -the current context to the `default` context. - -Use the `docker context ls` command to view what contexts are available on your -machine. The current context is indicated with an asterisk (`*`); - -```console -$ docker context ls -NAME DESCRIPTION DOCKER ENDPOINT ... -default * Current DOCKER_HOST based configuration unix:///var/run/docker.sock ... -desktop-linux unix:///home//.docker/desktop/docker.sock ... -``` - -If you have both Docker Desktop and Docker Engine installed on the same machine, -you can run the `docker context use` command to switch between the Docker Desktop -and Docker Engine contexts. For example, use the "default" context to interact -with the Docker Engine; - -```console -$ docker context use default -default -Current context is now "default" -``` - -And use the `desktop-linux` context to interact with Docker Desktop: - -```console -$ docker context use desktop-linux -desktop-linux -Current context is now "desktop-linux" -``` - -Refer to the [Docker Context documentation](../../engine/context/working-with-contexts.md) for more details. - -## Why Docker Desktop for Linux runs a VM - - -Docker Desktop for Linux runs a Virtual Machine (VM) for the following reasons: - -1. **To ensure that Docker Desktop provides a consistent experience across platforms**. - - During research, the most frequently cited reason for users wanting Docker Desktop for Linux (DD4L) was to ensure a consistent Docker Desktop - experience with feature parity across all major operating systems. Utilizing - a VM ensures that the Docker Desktop experience for Linux users will closely - match that of Windows and macOS. - - This need to deliver a consistent experience across all major OSs will become increasingly important as we look towards adding exciting new features, such as Docker Extensions, to Docker Desktop that will benefit users across all tiers. We’ll provide more details on these at [DockerCon22](https://www.docker.com/dockercon/){: target="_blank" rel="noopener" class="_"}. Watch this space. - -2. **To make use of new kernel features** - - Sometimes we want to make use of new operating system features. Because we control the kernel and the OS inside the VM, we can roll these out to all users immediately, even to users who are intentionally sticking on an LTS version of their machine OS. - -3. **To enhance security** - - Container image vulnerabilities pose a security risk for the host environment. There is a large number of unofficial images that are not guaranteed to be verified for known vulnerabilities. Malicious users can push images to public registries and use different methods to trick users into pulling and running them. The VM approach mitigates this threat as any malware that gains root privileges is restricted to the VM environment without access to the host. - - Why not run rootless Docker? Although this has the benefit of superficially limiting access to the root user so everything looks safer in "top", it allows unprivileged users to gain `CAP_SYS_ADMIN` in their own user namespace and access kernel APIs which are not expecting to be used by unprivileged users, resulting in [vulnerabilities](https://www.openwall.com/lists/oss-security/2022/01/18/7){: target="_blank" rel="noopener" class="_"}. - -4. **To provide the benefits of feature parity and enhanced security, with minimal impact on performance** - - The VM utilized by DD4L uses [`virtiofs`](https://virtio-fs.gitlab.io){:target="_blank" rel="noopener" class="_"}, a shared file system that allows virtual machines to access a directory tree located on the host. Our internal benchmarking shows that with the right resource allocation to the VM, near native file system performance can be achieved with virtiofs. - - As such, we have adjusted the default memory available to the VM in DD4L. You can tweak this setting to your specific needs by using the **Memory** slider within the **Settings** > **Resources** tab of Docker Desktop. - -## File sharing - -Docker Desktop for Linux uses [virtiofs](https://virtio-fs.gitlab.io/){:target="_blank" rel="noopener"}{:target="_blank" rel="noopener"} as the -default (and currently only) mechanism to enable file sharing between the host -and Docker Desktop VM. In order not to require elevated privileges, without -unnecessarily restricting operations on the shared files, Docker Desktop runs -the file sharing service (`virtiofsd`) inside a user namespace (see -`user_namespaces(7)`) with UID and GID mapping configured. As a result Docker -Desktop relies on the host being configured to enable the current user to use -subordinate ID delegation. For this to be true `/etc/subuid` (see `subuid(5)`) -and `/etc/subgid` (see `subgid(5)`) must be present. Docker Desktop only -supports subordinate ID delegation configured via files. Docker Desktop maps the -current user ID and GID to 0 in the containers. It uses the first entry -corresponding to the current user in `/etc/subuid` and `/etc/subgid` to set up -mappings for IDs above 0 in the containers. - -| ID in container | ID on host | -| --------------- | -------------------------------------------------------------------------------- | -| 0 (root) | ID of the user running DD (e.g. 1000) | -| 1 | 0 + beginning of ID range specified in `/etc/subuid`/`/etc/subgid` (e.g. 100000) | -| 2 | 1 + beginning of ID range specified in `/etc/subuid`/`/etc/subgid` (e.g. 100001) | -| 3 | 2 + beginning of ID range specified in `/etc/subuid`/`/etc/subgid` (e.g. 100002) | -| ... | ... | - -If `/etc/subuid` and `/etc/subgid` are missing, they need to be created. -Both should contain entries in the form - -`::`. For example, to allow the current user -to use IDs from 100000 to 165535: - -```console -$ grep "$USER" /etc/subuid >> /dev/null 2&>1 || (echo "$USER:100000:65536" | sudo tee -a /etc/subuid) -$ grep "$USER" /etc/subgid >> /dev/null 2&>1 || (echo "$USER:100000:65536" | sudo tee -a /etc/subgid) -``` - -To verify the configs have been created correctly, inspect their contents: - -```console -$ echo $USER -exampleuser -$ cat /etc/subuid -exampleuser:100000:65536 -$ cat /etc/subgid -exampleuser:100000:65536 -``` - -In this scenario if a shared file is `chown`ed inside a Docker Desktop container -owned by a user with a UID of 1000, it shows up on the host as owned by -a user with a UID of 100999. This has the unfortunate side effect of preventing -easy access to such a file on the host. The problem is resolved by creating -a group with the new GID and adding our user to it, or by setting a recursive -ACL (see `setfacl(1)`) for folders shared with the Docker Desktop VM. ## Where to go next From bf279fdc04b95b88575759227dbe48d07f9d03e0 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Thu, 6 Oct 2022 14:02:16 +0200 Subject: [PATCH 06/79] css: fix button padding Signed-off-by: CrazyMax --- _scss/_buttons.scss | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/_scss/_buttons.scss b/_scss/_buttons.scss index 760d73179331..3a6799276abf 100755 --- a/_scss/_buttons.scss +++ b/_scss/_buttons.scss @@ -11,7 +11,6 @@ a.button { a.button.outline-btn { color: $primary-links; float: none; - margin-bottom: 30px; display: inline-block; } @@ -23,7 +22,7 @@ a.button.outline-btn.min-hgt { display: inline-block; margin: 10px 10px 10px 0; font-family: $buttons; - padding: 12px 35px 10px; + padding: 12px 35px; min-width: 200px; box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.1); text-align: center; @@ -35,10 +34,9 @@ a.button.outline-btn.min-hgt { } .primary-btn { - background: $primary-links; - border: 1px solid rgba(0, 0, 0, 0.1); + background: $primary-links; + border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 4px; - padding-top: 16px } /* From e66696fd63d92d6dcd38306d8be9ab6565313848 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Thu, 6 Oct 2022 14:16:50 +0200 Subject: [PATCH 07/79] build: improve overview page Signed-off-by: CrazyMax --- _data/toc.yaml | 4 ++-- build/customize/bake/index.md | 2 +- build/index.md | 45 ++++++++++++++++++++++++----------- 3 files changed, 34 insertions(+), 17 deletions(-) diff --git a/_data/toc.yaml b/_data/toc.yaml index 9a5c297e88ec..32817207f04f 100644 --- a/_data/toc.yaml +++ b/_data/toc.yaml @@ -1473,7 +1473,7 @@ manuals: - path: /build/building/packaging/ title: Packaging your software - path: /build/building/cache/ - title: Optimizing builds with cache management + title: Optimizing builds with cache - sectiontitle: Choosing a build driver section: - path: /build/building/drivers/ @@ -1492,7 +1492,7 @@ manuals: title: Multi-platform images - sectiontitle: Customizing builds section: - - sectiontitle: Orchestrating builds with Bake + - sectiontitle: High-level builds with Bake section: - path: /build/customize/bake/ title: Overview diff --git a/build/customize/bake/index.md b/build/customize/bake/index.md index 63f7a41c8059..d5dbc030de6c 100644 --- a/build/customize/bake/index.md +++ b/build/customize/bake/index.md @@ -1,5 +1,5 @@ --- -title: "High-level build options with Bake" +title: High-level builds with Bake keywords: build, buildx, bake, buildkit, hcl, json, compose redirect_from: - /build/bake/ diff --git a/build/index.md b/build/index.md index 58635c18cc0e..b318af2fb782 100644 --- a/build/index.md +++ b/build/index.md @@ -48,27 +48,41 @@ advanced scenarios: ### Packaging your software -Bundle and package your code to run anywhere, from your local Docker Desktop, -to Docker Engine and Kubernetes on the cloud. To get started with Build, -see the [Packaging your software](building/packaging.md) page. +Build and package your application to run it anywhere: locally using Docker +Desktop, or in the cloud using Docker Engine and Kubernetes: + +[Packaging your software](building/packaging.md){: .button .outline-btn } ### Choosing a build driver Run Buildx with different configurations depending on the scenario you are working on, regardless of whether you are using your local machine or a remote -compute cluster, all from the comfort of your local working environment. -For more information on drivers, see the [drivers guide](building/drivers/index.md). +cluster, all from the comfort of your local working environment: + +[Choosing a build driver](building/drivers/index.md){: .button .outline-btn } -### Optimizing builds with cache management +### Optimizing builds with cache Improve build performance by using a persistent shared build cache to avoid -repeating costly operations such as package installations, downloading files -from the internet, or code build steps. +repeating costly operations such as package installs, file downloads, or code +build steps: + +[Optimizing builds with cache](building/cache.md){: .button .outline-btn } + +### Multi-stage builds -### Creating build-once, run-anywhere with multi-platform builds +Use the multi-stage feature to selectively copy artifacts from one stage to +another, leaving behind everything you don't want in the final image, so you +keep your images small and secure with minimal depeendencies: -Collaborate across platforms with one build artifact. See -[Multi-platform images](building/multi-platform.md) page. +[Multi-stage builds](building/multi-stage.md){: .button .outline-btn } + +### Multi-platform images + +Using the standard Docker tooling and processes, you can start to build, push, +pull, and run images seamlessly on different computer architectures: + +[Multi-platform images](building/multi-platform.md){: .button .outline-btn } ## Continuous integration @@ -92,10 +106,13 @@ like from BuildKit, not just docker images. See [Set the export action for the b Securely access protected repositories and resources at build time without leaking data into the final build or the cache. -### Orchestrating builds using Bake +### High-level builds with Bake + +Bake provides support for high-level build concepts using a file definition +that goes beyond invoking a single build command. Bake allows all the services +to be built concurrently as part of a single request: -Connect your builds together and easily parameterize your images using buildx bake. -See [High-level build options with Bake](customize/bake/index.md). +[High-level builds with Bake](customize/bake/index.md){: .button .outline-btn } ## Extending BuildKit From 6494346dbe9f86161e3a5cb85c5643fb46552735 Mon Sep 17 00:00:00 2001 From: Mohamed Ramadan <54960175+sudofix@users.noreply.github.com> Date: Sat, 8 Oct 2022 23:11:48 +0200 Subject: [PATCH 08/79] Fix a typo in release 2.11.2 date "2002->2022" --- compose/release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/release-notes.md b/compose/release-notes.md index 599766b81d92..b322d6d46b05 100644 --- a/compose/release-notes.md +++ b/compose/release-notes.md @@ -8,7 +8,7 @@ redirect_from: --- ## 2.11.2 -(2002-09-27) +(2022-09-27) > **Note** > From f5b33ed7d37b76360473e300067061948b694e3c Mon Sep 17 00:00:00 2001 From: Akira Aso <44665462+akiraaso@users.noreply.github.com> Date: Sun, 9 Oct 2022 22:02:33 +0900 Subject: [PATCH 09/79] Fix typo --- contribute/style/terminology.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contribute/style/terminology.md b/contribute/style/terminology.md index a83cddf81d59..fd2fe4f21829 100644 --- a/contribute/style/terminology.md +++ b/contribute/style/terminology.md @@ -22,7 +22,7 @@ Use when we talk about the application, or all the functionality associated wit #### `docker compose` -Use code formatting) for referring to the commands in text and command usage examples/code samples. +Use code formatting for referring to the commands in text and command usage examples/code samples. #### Docker Compose CLI From 78be95092aa56ff3c563d92684e5e9e874925ddc Mon Sep 17 00:00:00 2001 From: Akira Aso <44665462+akiraaso@users.noreply.github.com> Date: Sun, 9 Oct 2022 22:07:07 +0900 Subject: [PATCH 10/79] Fix typo --- contribute/style/formatting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contribute/style/formatting.md b/contribute/style/formatting.md index f2f03eca8672..6f333612da58 100644 --- a/contribute/style/formatting.md +++ b/contribute/style/formatting.md @@ -56,7 +56,7 @@ The best links offer readers another way to scan information. - Use plain language that does not mislead or promise too much. - Be short and descriptive (around five words is best). -- Allow people to predict (with a fair degree of confidence) what they will get if they click mirror the heading text on the destination page in links whenever possible. +- Allow people to predict (with a fair degree of confidence) what they will get if they click. Mirror the heading text on the destination page in links whenever possible. - Front-load user-and-action-oriented terms at the beginning of the link (Download our app). - Avoid generic calls to action (such as click here, find out more). - Do not include any end punctuation when you hyperlink text (for example, periods, question marks, or exclamation points). From c18d54fcc78039c0d3cb10e99421b8ef849fca89 Mon Sep 17 00:00:00 2001 From: Rohan Mathur Date: Mon, 10 Oct 2022 17:16:07 +0530 Subject: [PATCH 11/79] docs: fix typo --- desktop/use-desktop/images.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/use-desktop/images.md b/desktop/use-desktop/images.md index 84424323809e..c4076c7c357e 100644 --- a/desktop/use-desktop/images.md +++ b/desktop/use-desktop/images.md @@ -47,7 +47,7 @@ Inspecting an image displays detailed information about the image such as the: - Image history - Image ID - Date the image was created -- Size of the imag +- Size of the image To inspect an image, hover over an image, select the **More options** button and then select **Inspect** from the dropdown menu. From bda82b638492e85fce1c846c1c3f50b936cee591 Mon Sep 17 00:00:00 2001 From: Mohan_J <57227290+PMohanJ@users.noreply.github.com> Date: Mon, 10 Oct 2022 21:06:38 +0530 Subject: [PATCH 12/79] Fix typo in bind-mounts.md --- storage/bind-mounts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/bind-mounts.md b/storage/bind-mounts.md index 3170864a9de8..f51b664375eb 100644 --- a/storage/bind-mounts.md +++ b/storage/bind-mounts.md @@ -396,7 +396,7 @@ services: volumes: - type: bind source: ./static - target: /opt/app/staticvolumes: + target: /opt/app/staticvolumes myapp: ``` From 0d14bcb8c3c05b80eef1a1ff9b0dc7b8b27dc90d Mon Sep 17 00:00:00 2001 From: Akira Aso <44665462+akiraaso@users.noreply.github.com> Date: Wed, 12 Oct 2022 01:59:32 +0900 Subject: [PATCH 13/79] Make a paragraph about docker ps concise (#15839) --- language/nodejs/run-containers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language/nodejs/run-containers.md b/language/nodejs/run-containers.md index 5d94c04a479a..a9e39d8fdd2a 100644 --- a/language/nodejs/run-containers.md +++ b/language/nodejs/run-containers.md @@ -87,7 +87,7 @@ $ curl --request POST \ ## List containers -Since we ran our container in the background, how do we know if our container is running or what other containers are running on our machine? Well, we can run the `docker ps` command. Just like on Linux, to see a list of processes on your machine we would run the ps command. In the same spirit, we can run the `docker ps` command which will show us a list of containers running on our machine. +Since we ran our container in the background, how do we know if our container is running or what other containers are running on our machine? Well, to see a list of containers running on our machine, run `docker ps`. This is similar to how ps command is used to see a list of processes on a Linux machine. ```console $ docker ps From 2706acd2ec61c3533849fc3d497661baa851e6de Mon Sep 17 00:00:00 2001 From: Daniel Schroeder Date: Tue, 11 Oct 2022 16:14:12 -0500 Subject: [PATCH 14/79] Update develop.md (#15829) There is no logic in that Flask app to save widgets, so I reworded the two sentences that referenced saving widgets. There are two routes: 1. `/widgets` -> Gets all the rows from the `widgets` table 2. `/initdb` -> Drops the DB/Table and rebuilds them from scratch --- language/python/develop.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/language/python/develop.md b/language/python/develop.md index fa4f6fb62615..5f0c62a835d6 100644 --- a/language/python/develop.md +++ b/language/python/develop.md @@ -73,7 +73,7 @@ In the above command, we logged in to the MySQL database by passing the ‘mysql Next, we'll update the sample application we created in the [Build images](build-images.md#sample-application) module. To see the directory structure of the Python app, see [Python application directory structure](build-images.md#directory-structure). -Okay, now that we have a running MySQL, let’s update the `app.py` to use MySQL as a datastore. Let’s also add some routes to our server. One for fetching records and one for inserting records. +Okay, now that we have a running MySQL, let’s update the `app.py` to use MySQL as a datastore. Let’s also add some routes to our server. One for fetching records and one for creating our database and table. ```python import mysql.connector @@ -141,7 +141,7 @@ if __name__ == "__main__": app.run(host ='0.0.0.0') ``` -We’ve added the MySQL module and updated the code to connect to the database server, created a database and table. We also created a couple of routes to save widgets and fetch widgets. We now need to rebuild our image so it contains our changes. +We’ve added the MySQL module and updated the code to connect to the database server, created a database and table. We also created a route to fetch widgets. We now need to rebuild our image so it contains our changes. First, let’s add the `mysql-connector-python` module to our application using pip. From b05c38a6f6f6c7d059c4c50e468973e017b1393b Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Wed, 12 Oct 2022 10:40:06 +0200 Subject: [PATCH 15/79] add cache backend docs (upstream) (#15853) Signed-off-by: David Karlsson Signed-off-by: David Karlsson --- _config.yml | 3 +++ _data/toc.yaml | 22 +++++++++++++++++--- build/building/cache/backends/azblob.md | 7 +++++++ build/building/cache/backends/gha.md | 7 +++++++ build/building/cache/backends/index.md | 7 +++++++ build/building/cache/backends/inline.md | 7 +++++++ build/building/cache/backends/local.md | 7 +++++++ build/building/cache/backends/registry.md | 7 +++++++ build/building/cache/backends/s3.md | 7 +++++++ build/building/{cache.md => cache/index.md} | 14 ++++++------- build/images/cache-stack-invalidate-copy.dot | 2 +- build/images/cache-stack-invalidate-copy.svg | 4 ++-- build/images/cache-stack-invalidate-rest.dot | 2 +- build/images/cache-stack-invalidate-rest.svg | 4 ++-- build/images/cache-stack.dot | 2 +- build/images/cache-stack.svg | 4 ++-- build/index.md | 2 +- 17 files changed, 87 insertions(+), 21 deletions(-) create mode 100644 build/building/cache/backends/azblob.md create mode 100644 build/building/cache/backends/gha.md create mode 100644 build/building/cache/backends/index.md create mode 100644 build/building/cache/backends/inline.md create mode 100644 build/building/cache/backends/local.md create mode 100644 build/building/cache/backends/registry.md create mode 100644 build/building/cache/backends/s3.md rename build/building/{cache.md => cache/index.md} (96%) diff --git a/_config.yml b/_config.yml index 582084c34e1d..9c178aca2af9 100644 --- a/_config.yml +++ b/_config.yml @@ -172,6 +172,9 @@ fetch-remote: - dest: "build/building/drivers" src: - "docs/guides/drivers/**" + - dest: "build/building/cache/backends" + src: + - "docs/guides/cache/**" - repo: "https://github.com/distribution/distribution" default_branch: "main" diff --git a/_data/toc.yaml b/_data/toc.yaml index 32817207f04f..12609e91b4b2 100644 --- a/_data/toc.yaml +++ b/_data/toc.yaml @@ -1472,9 +1472,7 @@ manuals: section: - path: /build/building/packaging/ title: Packaging your software - - path: /build/building/cache/ - title: Optimizing builds with cache - - sectiontitle: Choosing a build driver + - sectiontitle: Build drivers section: - path: /build/building/drivers/ title: Overview @@ -1486,6 +1484,24 @@ manuals: title: Kubernetes driver - path: /build/building/drivers/remote/ title: Remote driver + - path: /build/building/cache/ + title: Optimizing builds with cache + - sectiontitle: Cache backends + section: + - path: /build/building/cache/backends/ + title: Overview + - path: /build/building/cache/backends/inline/ + title: Inline + - path: /build/building/cache/backends/local/ + title: Local + - path: /build/building/cache/backends/registry/ + title: Registry + - path: /build/building/cache/backends/gha/ + title: GitHub Actions + - path: /build/building/cache/backends/azblob/ + title: Azure Blob Storage + - path: /build/building/cache/backends/s3/ + title: Amazon S3 - path: /build/building/multi-stage/ title: Multi-stage builds - path: /build/building/multi-platform/ diff --git a/build/building/cache/backends/azblob.md b/build/building/cache/backends/azblob.md new file mode 100644 index 000000000000..2db5435fe5ea --- /dev/null +++ b/build/building/cache/backends/azblob.md @@ -0,0 +1,7 @@ +--- +title: "Azure Blob Storage cache" +keywords: build, buildx, cache, backend, azblob, azure +fetch_remote: + line_start: 2 + line_end: -1 +--- diff --git a/build/building/cache/backends/gha.md b/build/building/cache/backends/gha.md new file mode 100644 index 000000000000..c4bbc05ca83a --- /dev/null +++ b/build/building/cache/backends/gha.md @@ -0,0 +1,7 @@ +--- +title: "GitHub Actions cache" +keywords: build, buildx, cache, backend, gha, github, actions +fetch_remote: + line_start: 2 + line_end: -1 +--- diff --git a/build/building/cache/backends/index.md b/build/building/cache/backends/index.md new file mode 100644 index 000000000000..25f8047fc887 --- /dev/null +++ b/build/building/cache/backends/index.md @@ -0,0 +1,7 @@ +--- +title: "Cache storage backends" +keywords: build, buildx, cache, backend, gha, azblob, s3, registry, local +fetch_remote: + line_start: 2 + line_end: -1 +--- diff --git a/build/building/cache/backends/inline.md b/build/building/cache/backends/inline.md new file mode 100644 index 000000000000..960dead6060a --- /dev/null +++ b/build/building/cache/backends/inline.md @@ -0,0 +1,7 @@ +--- +title: "Inline cache" +keywords: build, buildx, cache, backend, inline +fetch_remote: + line_start: 2 + line_end: -1 +--- diff --git a/build/building/cache/backends/local.md b/build/building/cache/backends/local.md new file mode 100644 index 000000000000..ac7b305cee89 --- /dev/null +++ b/build/building/cache/backends/local.md @@ -0,0 +1,7 @@ +--- +title: "Local cache" +keywords: build, buildx, cache, backend, local +fetch_remote: + line_start: 2 + line_end: -1 +--- diff --git a/build/building/cache/backends/registry.md b/build/building/cache/backends/registry.md new file mode 100644 index 000000000000..7e738716b2be --- /dev/null +++ b/build/building/cache/backends/registry.md @@ -0,0 +1,7 @@ +--- +title: "Registry cache" +keywords: build, buildx, cache, backend, registry +fetch_remote: + line_start: 2 + line_end: -1 +--- diff --git a/build/building/cache/backends/s3.md b/build/building/cache/backends/s3.md new file mode 100644 index 000000000000..2482973aa991 --- /dev/null +++ b/build/building/cache/backends/s3.md @@ -0,0 +1,7 @@ +--- +title: "Amazon S3 cache" +keywords: build, buildx, cache, backend, s3 +fetch_remote: + line_start: 2 + line_end: -1 +--- diff --git a/build/building/cache.md b/build/building/cache/index.md similarity index 96% rename from build/building/cache.md rename to build/building/cache/index.md index 282e375c6cc6..6ce025c0e018 100644 --- a/build/building/cache.md +++ b/build/building/cache/index.md @@ -25,7 +25,7 @@ program written in C. FROM ubuntu:latest RUN apt-get update && apt-get install -y build-essentials -COPY main.c /src/ +COPY main.c Makefile /src/ WORKDIR /src/ RUN make build ``` @@ -34,7 +34,7 @@ Each instruction in this Dockerfile translates (roughly) to a layer in your final image. You can think of image layers as a stack, with each layer adding more content on top of the layers that came before it: -![Image layer diagram showing the above commands chained together one after the other](../images/cache-stack.svg){:.invertible} +![Image layer diagram showing the above commands chained together one after the other](../../images/cache-stack.svg){:.invertible} Whenever a layer changes, that layer will need to be re-built. For example, suppose you make a change to your program in the `main.c` file. After this @@ -42,13 +42,13 @@ change, the `COPY` command will have to run again in order for those changes to appear in the image. In other words, Docker will invalidate the cache for this layer. -![Image layer diagram, but now with the link between COPY and WORKDIR marked as invalid](../images/cache-stack-invalidate-copy.svg){:.invertible} +![Image layer diagram, but now with the link between COPY and WORKDIR marked as invalid](../../images/cache-stack-invalidate-copy.svg){:.invertible} If a layer changes, all other layers that come after it are also affected. When the layer with the `COPY` command gets invalidated, all layers that follow will need to run again, too: -![Image layer diagram, but now with all links after COPY marked as invalid](../images/cache-stack-invalidate-rest.svg){:.invertible} +![Image layer diagram, but now with all links after COPY marked as invalid](../../images/cache-stack-invalidate-rest.svg){:.invertible} And that's the Docker build cache in a nutshell. Once a layer changes, then all downstream layers need to be rebuilt as well. Even if they wouldn't build @@ -287,8 +287,6 @@ of continuing.) ## Other resources -For more information on using cache to do efficient builds: +For more information on using cache to do efficient builds, see: - - -- [Export your build cache](https://github.com/moby/buildkit#export-cache) +- [Cache storage backends](./backends/index.md) diff --git a/build/images/cache-stack-invalidate-copy.dot b/build/images/cache-stack-invalidate-copy.dot index b552138127e3..f97486f367e1 100644 --- a/build/images/cache-stack-invalidate-copy.dot +++ b/build/images/cache-stack-invalidate-copy.dot @@ -8,7 +8,7 @@ digraph { from [ label = <FROM ubuntu:latest> ]; deps [ label = <RUN apt-get update && \\
apt-get install -y build-essentials> ]; - copy [ label = <COPY main.c /src/>, color = "red" ]; + copy [ label = <COPY main.c Makefile /src/>, color = "red" ]; workdir [ label = <WORKDIR /src/> ]; build [ label = <RUN make build> ]; diff --git a/build/images/cache-stack-invalidate-copy.svg b/build/images/cache-stack-invalidate-copy.svg index a0408995dba5..1a93f67c1590 100644 --- a/build/images/cache-stack-invalidate-copy.svg +++ b/build/images/cache-stack-invalidate-copy.svg @@ -33,8 +33,8 @@ copy -COPY -main.c /src/ +COPY +main.c Makefile /src/ diff --git a/build/images/cache-stack-invalidate-rest.dot b/build/images/cache-stack-invalidate-rest.dot index 91c0ccc12740..81824186e092 100644 --- a/build/images/cache-stack-invalidate-rest.dot +++ b/build/images/cache-stack-invalidate-rest.dot @@ -8,7 +8,7 @@ digraph { from [ label = <FROM ubuntu:latest> ]; deps [ label = <RUN apt-get update && \\
apt-get install -y build-essentials> ]; - copy [ label = <COPY main.c /src/>, color = "red" ]; + copy [ label = <COPY main.c Makefile /src/>, color = "red" ]; workdir [ label = <WORKDIR /src/>, color = "red" ]; build [ label = <RUN make build>, color = "red" ]; diff --git a/build/images/cache-stack-invalidate-rest.svg b/build/images/cache-stack-invalidate-rest.svg index 7d0830d51dbf..ee6c2e0672d3 100644 --- a/build/images/cache-stack-invalidate-rest.svg +++ b/build/images/cache-stack-invalidate-rest.svg @@ -33,8 +33,8 @@ copy -COPY -main.c /src/ +COPY +main.c Makefile /src/ diff --git a/build/images/cache-stack.dot b/build/images/cache-stack.dot index 7df536f72725..31e35443248c 100644 --- a/build/images/cache-stack.dot +++ b/build/images/cache-stack.dot @@ -8,7 +8,7 @@ digraph { from [ label = <FROM ubuntu:latest> ]; deps [ label = <RUN apt-get update && \\
apt-get install -y build-essentials> ]; - copy [ label = <COPY main.c /src/> ]; + copy [ label = <COPY main.c Makefile /src/> ]; workdir [ label = <WORKDIR /src/> ]; build [ label = <RUN make build> ]; diff --git a/build/images/cache-stack.svg b/build/images/cache-stack.svg index 73522805a7d4..9ac19295941e 100644 --- a/build/images/cache-stack.svg +++ b/build/images/cache-stack.svg @@ -33,8 +33,8 @@ copy -COPY -main.c /src/ +COPY +main.c Makefile /src/ diff --git a/build/index.md b/build/index.md index b318af2fb782..16a6db032746 100644 --- a/build/index.md +++ b/build/index.md @@ -67,7 +67,7 @@ Improve build performance by using a persistent shared build cache to avoid repeating costly operations such as package installs, file downloads, or code build steps: -[Optimizing builds with cache](building/cache.md){: .button .outline-btn } +[Optimizing builds with cache](./building/cache/index.md){: .button .outline-btn } ### Multi-stage builds From 888941b295ed88d151118e735e103c8aa9d71568 Mon Sep 17 00:00:00 2001 From: Allie Sadler <102604716+aevesdocker@users.noreply.github.com> Date: Wed, 12 Oct 2022 12:30:00 +0100 Subject: [PATCH 16/79] contribute tweaks (#15859) --- _data/toc.yaml | 2 +- contribute/components/call-outs.md | 22 +++++++++++----------- contribute/overview.md | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/_data/toc.yaml b/_data/toc.yaml index 12609e91b4b2..5b43a1594fab 100644 --- a/_data/toc.yaml +++ b/_data/toc.yaml @@ -1811,7 +1811,7 @@ contribute: - path: /contribute/components/badges/ title: Badges - path: /contribute/components/call-outs/ - title: Call outs + title: Callouts - path: /contribute/components/cards/ title: Cards - path: /contribute/components/code-blocks/ diff --git a/contribute/components/call-outs.md b/contribute/components/call-outs.md index 4210a2ad739b..e7f8bcd3cb74 100644 --- a/contribute/components/call-outs.md +++ b/contribute/components/call-outs.md @@ -1,10 +1,10 @@ --- description: components and formatting examples used in Docker's docs -title: Call outs +title: Callouts toc_max: 3 --- -We support these broad categories of call outs: +We support these broad categories of callouts: - Notes (no Liquid tag required) - Important, which use the `{: .important}` tag @@ -37,21 +37,21 @@ We support these broad categories of call outs: > `docker-compose down`. If you want to remove the volumes, you will need to add > the `--volumes` flag. > -> The Docker Dashboard does _not_ remove volumes when you delete the app stack. +> The Docker Dashboard does not remove volumes when you delete the app stack. {: .warning} ## HTML ```html > **Note** - > - > Note the way the `get_hit_count` function is written. This basic retry - > loop lets us attempt our request multiple times if the redis service is - > not available. This is useful at startup while the application comes - > online, but also makes our application more resilient if the Redis - > service needs to be restarted anytime during the app's lifetime. In a - > cluster, this also helps handling momentary connection drops between - > nodes. +> +> Note the way the `get_hit_count` function is written. This basic retry +> loop lets us attempt our request multiple times if the redis service is +> not available. This is useful at startup while the application comes +> online, but also makes our application more resilient if the Redis +> service needs to be restarted anytime during the app's lifetime. In a +> cluster, this also helps handling momentary connection drops between +> nodes. > **Important** > diff --git a/contribute/overview.md b/contribute/overview.md index a17adadff51c..3ec41f1af34f 100644 --- a/contribute/overview.md +++ b/contribute/overview.md @@ -25,8 +25,8 @@ as possible for you to work in this repository. The following sections guide you
Docker Desktop for Mac
-

Grammar guide

-

Explore Docker's grammar guide.

+

Grammar and style

+

Explore Docker's grammar and style guide.

@@ -34,7 +34,7 @@ as possible for you to work in this repository. The following sections guide you
Docker for Linux
-

Formatting guidelines

+

Formatting

Format your content to match the rest of our documentation.

From ada4c6888cacccf579078ee221d38e5d0d9c0d81 Mon Sep 17 00:00:00 2001 From: Arslan Noor <45531079+arslannoorpansota@users.noreply.github.com> Date: Thu, 13 Oct 2022 02:25:30 +0500 Subject: [PATCH 17/79] added hypen (#15273) --- samples/django.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/django.md b/samples/django.md index 5dc460cfabc6..d8f936f57719 100644 --- a/samples/django.md +++ b/samples/django.md @@ -267,7 +267,7 @@ In this section, you set up the database connection for Django. ``` * Or, for a more elegant shutdown, switch to a different shell, and run - [docker compose down](../engine/reference/commandline/compose_down.md) from the top level of your + [docker-compose down](../engine/reference/commandline/compose_down.md) from the top level of your Django sample project directory. ```console From f9175682813bdd81f754f9062d36d726596c0949 Mon Sep 17 00:00:00 2001 From: Usha Mandya Date: Thu, 13 Oct 2022 14:56:02 +0100 Subject: [PATCH 18/79] Removed dupe of contribution guidelines Signed-off-by: Usha Mandya --- _data/toc.yaml | 3 - _layouts/landing.html | 3 +- contribute/overview.md | 1 + opensource/images/bonus.png | Bin 43524 -> 0 bytes opensource/images/docker-friends.png | Bin 221276 -> 0 bytes opensource/images/docs-site-feedback.png | Bin 490207 -> 0 bytes opensource/images/gordon.jpeg | Bin 19941 -> 0 bytes opensource/images/irc_login.png | Bin 19323 -> 0 bytes opensource/images/triage-label.png | Bin 12121 -> 0 bytes opensource/images/tutorials.png | Bin 37719 -> 0 bytes opensource/index.md | 75 ------------- opensource/ways.md | 129 ----------------------- registry/help.md | 1 - 13 files changed, 2 insertions(+), 210 deletions(-) delete mode 100644 opensource/images/bonus.png delete mode 100644 opensource/images/docker-friends.png delete mode 100644 opensource/images/docs-site-feedback.png delete mode 100644 opensource/images/gordon.jpeg delete mode 100644 opensource/images/irc_login.png delete mode 100644 opensource/images/triage-label.png delete mode 100644 opensource/images/tutorials.png delete mode 100644 opensource/index.md delete mode 100644 opensource/ways.md diff --git a/_data/toc.yaml b/_data/toc.yaml index 5b43a1594fab..998c1301a1ee 100644 --- a/_data/toc.yaml +++ b/_data/toc.yaml @@ -18,7 +18,6 @@ horizontalnav: - title: Contribute path: /contribute/overview/ node: contribute - # TODO unify navbbar links: homepage currently has a custom "articles" link hide_home: true home: {} @@ -376,8 +375,6 @@ guides: title: Use the VFS storage driver - path: /get-started/resources/ title: "Educational resources" -- path: /opensource/ - title: "Contribute to documentation" reference: - path: /reference/ diff --git a/_layouts/landing.html b/_layouts/landing.html index c68e77641629..5a8c70d13527 100644 --- a/_layouts/landing.html +++ b/_layouts/landing.html @@ -21,8 +21,7 @@ {%- for entry in site.data.toc.horizontalnav -%} {%- if entry.hide_home -%}{% continue %}{%- endif -%} {{ entry.title }} - {%- endfor -%} -
  • Articles
  • + {%- endfor -%}
  • Contribute