diff --git a/_includes/head.html b/_includes/head.html
index fbbf96e7c9af..3fb4bd12ac14 100644
--- a/_includes/head.html
+++ b/_includes/head.html
@@ -68,6 +68,7 @@
+
{%- endif -%}
{%- if site.local_search -%}
diff --git a/_includes/install-script.md b/_includes/install-script.md
index 0fc545e28f6c..c17f903211e3 100644
--- a/_includes/install-script.md
+++ b/_includes/install-script.md
@@ -1,16 +1,17 @@
-
-
### Install using the convenience script
-Docker provides a convenience script at [get.docker.com](https://get.docker.com/)
-to install Docker into development environments quickly and non-interactively.
-The convenience script is not recommended for production environments, but can be
-used as an example to create a provisioning script that is tailored to your needs.
-Also refer to the [install using the repository](#install-using-the-repository)
-steps to learn about installation steps to install using the package repository.
-The source code for the script is open source, and can be found in the
-[`docker-install` repository on GitHub](https://github.com/docker/docker-install){:target="_blank" rel="noopener" class="_"}.
+Docker provides a convenience script at
+[https://get.docker.com/](https://get.docker.com/) to install Docker into
+development environments non-interactively. The convenience script isn't
+recommended for production environments, but it's useful for creating a
+provisioning script tailored to your needs. Also refer to the
+[install using the repository](#install-using-the-repository) steps to learn
+about installation steps to install using the package repository. The source
+code for the script is open source, and can be found in the
+[`docker-install` repository on GitHub](https://github.com/docker/docker-install){:target="_blank"
+rel="noopener" class="_"}.
+
Always examine scripts downloaded from the internet before running them locally.
Before installing, make yourself familiar with potential risks and limitations
of the convenience script:
@@ -18,31 +19,32 @@ of the convenience script:
- The script requires `root` or `sudo` privileges to run.
- The script attempts to detect your Linux distribution and version and
- configure your package management system for you, and does not allow you to
- customize most installation parameters.
+ configure your package management system for you.
+- The script doesn't allow you to customize most installation parameters.
- The script installs dependencies and recommendations without asking for
confirmation. This may install a large number of packages, depending on the
current configuration of your host machine.
-- By default, the script installs the latest stable release of Docker, containerd,
- and runc. When using this script to provision a machine, this may result in
- unexpected major version upgrades of Docker. Always test (major) upgrades in
+- By default, the script installs the latest stable release of Docker,
+ containerd, and runc. When using this script to provision a machine, this may
+ result in unexpected major version upgrades of Docker. Always test upgrades in
a test environment before deploying to your production systems.
-- The script is not designed to upgrade an existing Docker installation. When
+- The script isn't designed to upgrade an existing Docker installation. When
using the script to update an existing installation, dependencies may not be
- updated to the expected version, causing outdated versions to be used.
+ updated to the expected version, resulting in outdated versions.
> Tip: preview script steps before running
>
> You can run the script with the `DRY_RUN=1` option to learn what steps the
-> script will execute during installation:
+> script will run when invoked:
>
> ```console
> $ curl -fsSL https://get.docker.com -o get-docker.sh
-> $ DRY_RUN=1 sh ./get-docker.sh
+> $ DRY_RUN=1 sudo sh ./get-docker.sh
> ```
-This example downloads the script from [get.docker.com](https://get.docker.com/)
-and runs it to install the latest stable release of Docker on Linux:
+This example downloads the script from
+[https://get.docker.com/](https://get.docker.com/) and runs it to install the
+latest stable release of Docker on Linux:
```console
$ curl -fsSL https://get.docker.com -o get-docker.sh
@@ -51,41 +53,42 @@ Executing docker install script, commit: 7cae5f8b0decc17d6571f9f52eb840fbc13b273
<...>
```
-Docker is installed. The `docker` service starts automatically on Debian based
-distributions. On `RPM` based distributions, such as CentOS, Fedora, RHEL or SLES,
-you need to start it manually using the appropriate `systemctl` or `service` command.
-As the message indicates, non-root users cannot run Docker commands by default.
+You have now successfully installed and started Docker Engine. The `docker`
+service starts automatically on Debian based distributions. On `RPM` based
+distributions, such as CentOS, Fedora, RHEL or SLES, you need to start it
+manually using the appropriate `systemctl` or `service` command. As the message
+indicates, non-root users can't run Docker commands by default.
> **Use Docker as a non-privileged user, or install in rootless mode?**
>
> The installation script requires `root` or `sudo` privileges to install and
> use Docker. If you want to grant non-root users access to Docker, refer to the
> [post-installation steps for Linux](/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user).
-> Docker can also be installed without `root` privileges, or configured to run
-> in rootless mode. For instructions on running Docker in rootless mode, refer to
+> You can also install Docker without `root` privileges, or configured to run in
+> rootless mode. For instructions on running Docker in rootless mode, refer to
> [run the Docker daemon as a non-root user (rootless mode)](/engine/security/rootless/).
#### Install pre-releases
-Docker also provides a convenience script at [test.docker.com](https://test.docker.com/)
-to install pre-releases of Docker on Linux. This script is equivalent to the
-script at `get.docker.com`, but configures your package manager to enable the
-"test" channel from our package repository, which includes both stable and
-pre-releases (beta versions, release-candidates) of Docker. Use this script to
-get early access to new releases, and to evaluate them in a testing environment
-before they are released as stable.
+Docker also provides a convenience script at
+[https://test.docker.com/](https://test.docker.com/) to install pre-releases of
+Docker on Linux. This script is equal to the script at `get.docker.com`, but
+configures your package manager to use the test channel of the Docker package
+repository. The test channel includes both stable and pre-releases (beta
+versions, release-candidates) of Docker. Use this script to get early access to
+new releases, and to evaluate them in a testing environment before they're
+released as stable.
-To install the latest version of Docker on Linux from the "test" channel, run:
+To install the latest version of Docker on Linux from the test channel, run:
```console
$ curl -fsSL https://test.docker.com -o test-docker.sh
$ sudo sh test-docker.sh
-<...>
```
#### Upgrade Docker after using the convenience script
If you installed Docker using the convenience script, you should upgrade Docker
-using your package manager directly. There is no advantage to re-running the
-convenience script, and it can cause issues if it attempts to re-add
-repositories which have already been added to the host machine.
+using your package manager directly. There's no advantage to re-running the
+convenience script. Re-running it can cause issues if it attempts to re-install
+repositories which already exist on the host machine.
diff --git a/_includes/landing-page/hardened-desktop.html b/_includes/landing-page/hardened-desktop.html
new file mode 100644
index 000000000000..69f96881e634
--- /dev/null
+++ b/_includes/landing-page/hardened-desktop.html
@@ -0,0 +1,19 @@
+
+
+
+
+ Hardened Desktop for Docker Business customers
+
+
+
Two new security features have been introduced for Docker Business users, Settings Management and Enhanced Container Isolation, as part of Docker Desktop’s new Hardened Desktop security model.
+
\ No newline at end of file
diff --git a/_layouts/landing.html b/_layouts/landing.html
index c68e77641629..136fa49f6f78 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 -%}
- {% include landing-page/extensions-banner.html %}
+ {% include landing-page/hardened-desktop.html %}
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/
---
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
}
/*
diff --git a/_scss/_content.scss b/_scss/_content.scss
index 0d95b07e0e19..f76f338f407c 100755
--- a/_scss/_content.scss
+++ b/_scss/_content.scss
@@ -46,6 +46,15 @@ code {
.highlighter-rouge {
margin: 15px 0;
+ position: relative;
+
+ button.copy {
+ position: absolute;
+ top: 10px;
+ right: 10px;
+ background: none;
+ border: none;
+ }
}
/*
diff --git a/assets/images/grayed-setting.png b/assets/images/grayed-setting.png
new file mode 100644
index 000000000000..a163646fe866
Binary files /dev/null and b/assets/images/grayed-setting.png differ
diff --git a/assets/images/hardened-desktop.PNG b/assets/images/hardened-desktop.PNG
new file mode 100644
index 000000000000..f8984a0b62aa
Binary files /dev/null and b/assets/images/hardened-desktop.PNG differ
diff --git a/assets/images/lock.svg b/assets/images/lock.svg
new file mode 100644
index 000000000000..3719288ff744
--- /dev/null
+++ b/assets/images/lock.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/images/registry.svg b/assets/images/registry.svg
new file mode 100644
index 000000000000..06939007753b
--- /dev/null
+++ b/assets/images/registry.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/images/secure.svg b/assets/images/secure.svg
new file mode 100644
index 000000000000..5c829fb2c356
--- /dev/null
+++ b/assets/images/secure.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/js/copy.js b/assets/js/copy.js
new file mode 100644
index 000000000000..4ca8bf561b48
--- /dev/null
+++ b/assets/js/copy.js
@@ -0,0 +1,31 @@
+// copy code icon markup
+const copyIcon = ``
+
+// insert copy buttons for code blocks
+const codeBlocks = document.querySelectorAll("div.highlighter-rouge")
+codeBlocks.forEach((codeBlock) => {
+ codeBlock.insertAdjacentHTML(
+ "afterbegin",
+ ``
+ )
+})
+
+// handler that saves the code block innerText to clipboard
+function copyCodeBlock(event) {
+ const copyButton = event.currentTarget
+ const codeBlock = copyButton.parentElement.querySelector("pre.highlight code")
+ const code = codeBlock.innerText.trim()
+ // remove "$ " prompt at start of lines in code
+ const strippedCode = code.replace(/^[\s]?\$\s+/gm, "")
+ window.navigator.clipboard.writeText(strippedCode)
+
+ // change the button text temporarily
+ copyButton.textContent = "Copied!"
+ setTimeout(() => copyButton.innerHTML = copyIcon, 3000)
+}
+
+// register event listeners for copy buttons
+const copyButtons = document.querySelectorAll("button.copy")
+copyButtons.forEach((btn) => {
+ btn.addEventListener("click", copyCodeBlock)
+})
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:
-{:.invertible}
+{:.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.
-{:.invertible}
+{:.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:
-{:.invertible}
+{:.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/building/multi-stage.md b/build/building/multi-stage.md
index e5d1eba545c9..577113b6f2cd 100644
--- a/build/building/multi-stage.md
+++ b/build/building/multi-stage.md
@@ -19,7 +19,7 @@ Dockerfiles while keeping them easy to read and maintain.
## Before multi-stage builds
One of the most challenging things about building images is keeping the image
-size down. Each instruction in the Dockerfile adds a layer to the image, and you
+size down. Each `RUN`, `COPY`, and `ADD` instruction in the Dockerfile adds a layer to the image, and you
need to remember to clean up any artifacts you don't need before moving on to
the next layer. To write a really efficient Dockerfile, you have traditionally
needed to employ shell tricks and other logic to keep the layers as small as
@@ -205,3 +205,78 @@ RUN g++ -o /binary source.cpp
## Version compatibility
Multi-stage build syntax was introduced in Docker Engine 17.05.
+
+## Differences between legacy build and BuildKit
+
+The legacy Docker Engine builder processes all stages of a Dockerfile leading up to the selected `--target`. It will build a stage even if the selected target doesn't depend on that stage.
+
+BuildKit only builds the stages that the target stage depends on.
+
+For example, given the following Dockerfile:
+
+```dockerfile
+# syntax=docker/dockerfile:1
+FROM ubuntu AS base
+RUN echo "base"
+
+FROM base AS stage1
+RUN echo "stage1"
+
+FROM base AS stage2
+RUN echo "stage2"
+```
+
+With BuildKit enabled, building the `stage2` target in this Dockerfile means only `base` and `stage2` are processed. There is no dependency on `stage1`, so it's skipped.
+
+```console
+$ DOCKER_BUILDKIT=1 docker build --no-cache -f Dockerfile --target stage2 .
+[+] Building 0.4s (7/7) FINISHED
+ => [internal] load build definition from Dockerfile 0.0s
+ => => transferring dockerfile: 36B 0.0s
+ => [internal] load .dockerignore 0.0s
+ => => transferring context: 2B 0.0s
+ => [internal] load metadata for docker.io/library/ubuntu:latest 0.0s
+ => CACHED [base 1/2] FROM docker.io/library/ubuntu 0.0s
+ => [base 2/2] RUN echo "base" 0.1s
+ => [stage2 1/1] RUN echo "stage2" 0.2s
+ => exporting to image 0.0s
+ => => exporting layers 0.0s
+ => => writing image sha256:f55003b607cef37614f607f0728e6fd4d113a4bf7ef12210da338c716f2cfd15 0.0s
+```
+
+On the other hand, building the same target without BuildKit results in all stages being processed:
+
+```console
+$ DOCKER_BUILDKIT=0 docker build --no-cache -f Dockerfile --target stage2 .
+Sending build context to Docker daemon 219.1kB
+Step 1/6 : FROM ubuntu AS base
+ ---> a7870fd478f4
+Step 2/6 : RUN echo "base"
+ ---> Running in e850d0e42eca
+base
+Removing intermediate container e850d0e42eca
+ ---> d9f69f23cac8
+Step 3/6 : FROM base AS stage1
+ ---> d9f69f23cac8
+Step 4/6 : RUN echo "stage1"
+ ---> Running in 758ba6c1a9a3
+stage1
+Removing intermediate container 758ba6c1a9a3
+ ---> 396baa55b8c3
+Step 5/6 : FROM base AS stage2
+ ---> d9f69f23cac8
+Step 6/6 : RUN echo "stage2"
+ ---> Running in bbc025b93175
+stage2
+Removing intermediate container bbc025b93175
+ ---> 09fc3770a9c4
+Successfully built 09fc3770a9c4
+```
+
+`stage1` gets executed when BuildKit is disabled, even if `stage2` does not depend on it.
+
+BuildKit is enabled by default if you use Docker Desktop.
+
+Always run multi-stage builds with
+[BuildKit enabled](/develop/develop-images/build_enhancements/)
+for better performance.
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/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 58635c18cc0e..2d4f9178642b 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/index.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 dependencies:
-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
diff --git a/compose/compose-v2/index.md b/compose/compose-v2/index.md
new file mode 100644
index 000000000000..4e83a57390d7
--- /dev/null
+++ b/compose/compose-v2/index.md
@@ -0,0 +1,45 @@
+---
+description: Key features and use cases of Docker Compose
+keywords: documentation, docs, docker, compose, orchestration, containers, uses, features
+title: Compose V2 Overview
+---
+
+## Compose V2 and the new `docker compose` command
+
+> Important
+>
+> The new Compose V2, which supports the `compose` command as part of the Docker
+> CLI, is now available.
+>
+> Compose V2 integrates compose functions into the Docker platform, continuing
+> to support most of the previous `docker-compose` features and flags. You can
+> run Compose V2 by replacing the hyphen (`-`) with a space, using `docker compose`,
+> instead of `docker-compose`.
+{: .important}
+
+If you rely on using Docker Compose as `docker-compose` (with a hyphen), you can
+set up Compose V2 to act as a drop-in replacement of the previous `docker-compose`.
+Refer to the [Installing Compose](../install/index.md) section for detailed instructions.
+
+## Context of Docker Compose evolution
+
+Introduction of the [Compose specification](https://github.com/compose-spec/compose-spec){:target="_blank" rel="noopener" class="_"}
+makes a clean distinction between the Compose YAML file model and the `docker-compose`
+implementation. Making this change has enabled a number of enhancements, including
+adding the `compose` command directly into the Docker CLI, being able to "up" a
+Compose application on cloud platforms by simply switching the Docker context,
+and launching of [Amazon ECS](../../cloud/ecs-integration.md) and [Microsoft ACI](../../cloud/aci-integration.md).
+As the Compose specification evolves, new features land faster in the Docker CLI.
+
+Compose V2 relies directly on the compose-go bindings which are maintained as part
+of the specification. This allows us to include community proposals, experimental
+implementations by the Docker CLI and/or Engine, and deliver features faster to
+users. Compose V2 also supports some of the newer additions to the specification,
+such as [profiles](../profiles.md) and [GPU](../gpu-support.md) devices.
+
+Compose V2 has been re-written in [Go](https://go.dev), which improves integration
+with other Docker command-line features, and allows it to run natively on
+[macOS on Apple silicon](../../desktop/mac/apple-silicon.md), Windows, and Linux,
+without dependencies such as Python.
+
+For more information about compatibility with the compose v1 command-line, see the [docker-compose compatibility list](../cli-command-compatibility.md).
\ No newline at end of file
diff --git a/compose/environment-variables.md b/compose/environment-variables.md
index 0b3af8969725..d71c2da6a273 100644
--- a/compose/environment-variables.md
+++ b/compose/environment-variables.md
@@ -35,7 +35,7 @@ named `.env`. The `.env` file path is as follows:
- Starting from `v1.28`, the `.env` file is placed at the base of the project directory.
- Project directory can be explicitly defined with the `--file` option or `COMPOSE_FILE`
- environment variable. Otherwise, it is the current working directory where the `docker compose` command is executed (`+1.28`).
+ environment variable. Otherwise, it is the current working directory where the `docker compose` command is executed (`v1.28`).
- For versions older than `v1.28`, it might have trouble resolving `.env` file with `--file` or `COMPOSE_FILE`. To work around it, it is recommended to use `--project-directory`, which overrides the path for the `.env` file. This inconsistency is addressed in `v1.28` by limiting the file path to the project directory.
diff --git a/compose/faq.md b/compose/faq.md
index d54bc00b703d..eeef5795d92f 100644
--- a/compose/faq.md
+++ b/compose/faq.md
@@ -112,6 +112,19 @@ the directory contents of the image.
There are [many examples of Compose files on
GitHub](https://github.com/search?q=in%3Apath+docker-compose.yml+extension%3Ayml&type=Code).
+## Getting help
+
+Docker Compose is under active development. If you need help, would like to
+contribute, or simply want to talk about the project with like-minded
+individuals, we have a number of open channels for communication.
+
+* To report bugs or file feature requests: use the [issue tracker on Github](https://github.com/docker/compose/issues).
+
+* To talk about the project with people in real time: join the
+ `#docker-compose` channel on the Docker Community Slack.
+
+* To contribute code or documentation changes: submit a [pull request on Github](https://github.com/docker/compose/pulls).
+
## Compose documentation
diff --git a/compose/features-uses.md b/compose/features-uses.md
new file mode 100644
index 000000000000..4de4892ed313
--- /dev/null
+++ b/compose/features-uses.md
@@ -0,0 +1,131 @@
+---
+description: Key features and use cases of Docker Compose
+keywords: documentation, docs, docker, compose, orchestration, containers, uses, features
+title: Key features and use cases
+---
+
+Using Compose is essentially a three-step process:
+
+1. Define your app's environment with a `Dockerfile` so it can be reproduced
+anywhere.
+
+2. Define the services that make up your app in `docker-compose.yml`
+so they can be run together in an isolated environment.
+
+3. Run `docker compose up` and the [Docker compose command](compose-v2/index.md#compose-v2-and-the-new-docker-compose-command) starts and runs your entire app. You can alternatively run `docker-compose up` using Compose standalone(`docker-compose` binary).
+
+A `docker-compose.yml` looks like this:
+
+```yaml
+version: "{{ site.compose_file_v3 }}" # optional since v1.27.0
+services:
+ web:
+ build: .
+ ports:
+ - "8000:5000"
+ volumes:
+ - .:/code
+ - logvolume01:/var/log
+ depends_on:
+ - redis
+ redis:
+ image: redis
+volumes:
+ logvolume01: {}
+```
+
+For more information about the Compose file, see the
+[Compose file reference](compose-file/index.md).
+
+## Key features of Docker Compose
+
+### Have multiple isolated environments on a single host
+
+Compose uses a project name to isolate environments from each other. You can make use of this project name in several different contexts:
+
+* on a dev host, to create multiple copies of a single environment, such as when you want to run a stable copy for each feature branch of a project
+* on a CI server, to keep builds from interfering with each other, you can set
+ the project name to a unique build number
+* on a shared host or dev host, to prevent different projects, which may use the
+ same service names, from interfering with each other
+
+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](reference/index.md) or the
+[`COMPOSE_PROJECT_NAME` environment variable](reference/envvars.md#compose_project_name).
+
+The default project directory is the base directory of the Compose file. A custom value
+for it can be defined with the `--project-directory` command line option.
+
+
+### Preserves volume data when containers are created
+
+Compose preserves all volumes used by your services. When `docker compose up`
+runs, if it finds any containers from previous runs, it copies the volumes from
+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](reference/envvars.md) and adjust the necessary environment
+variables for your specific needs.
+
+
+### Only recreate containers that have changed
+
+Compose caches the configuration used to create a container. When you
+restart a service that has not changed, Compose re-uses the existing
+containers. Re-using containers means that you can make changes to your
+environment very quickly.
+
+
+### Supports variables and moving a composition between environments
+
+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-file/compose-file-v3.md#variable-substitution) for more
+details.
+
+You can extend a Compose file using the `extends` field or by creating multiple
+Compose files. See [extends](extends.md) for more details.
+
+## Common use cases of Docker Compose
+
+Compose can be used in many different ways. Some common use cases are outlined
+below.
+
+### Development environments
+
+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-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
+(`docker-compose up`).
+
+Together, these features provide a convenient way for developers to get
+started on a project. Compose can reduce a multi-page "developer getting
+started guide" to a single machine readable Compose file and a few commands.
+
+### Automated testing environments
+
+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-file/index.md), you can create and destroy these environments in just a few commands:
+
+```console
+$ docker compose up -d
+$ ./run_tests
+$ docker compose down
+```
+
+### Single host deployments
+
+Compose has traditionally been focused on development and testing workflows,
+but with each release we're making progress on more production-oriented features.
+
+For details on using production-oriented features, see
+[compose in production](production.md) in this documentation.
\ No newline at end of file
diff --git a/compose/gettingstarted.md b/compose/gettingstarted.md
index 49aef459ca57..49765b8f2984 100644
--- a/compose/gettingstarted.md
+++ b/compose/gettingstarted.md
@@ -1,23 +1,23 @@
---
description: Get started with Docker Compose
keywords: documentation, docs, docker, compose, orchestration, containers
-title: Get started with Docker Compose
+title: Try Docker Compose
---
-On this page you build a simple Python web application running on Docker
-Compose. The application uses the Flask framework and maintains a hit counter in
-Redis. While the sample uses Python, the concepts demonstrated here should be
-understandable even if you're not familiar with it.
+This tutorial is designed to introduce the key concepts of Docker Compose whilst building a simple Python web application. The application uses the Flask framework and maintains a hit counter in
+Redis.
+
+The concepts demonstrated here should be understandable even if you're not familiar Python.
## Prerequisites
-Make sure you have already installed both [Docker Engine](../get-docker.md)
-and [Docker Compose](install/index.md). You don't need to install Python or Redis, as
-both are provided by Docker images.
+You need to have Docker Engine and Docker Compose on your machine. You can either:
+- Install [Docker Engine](../get-docker.md) and [Docker Compose](install/index.md) as standalone binaries
+- Install [Docker Desktop](../desktop/index.md) which includes both Docker Engine and Docker Compose
-## Step 1: Setup
+You don't need to install Python or Redis, as both are provided by Docker images.
-Define the application dependencies.
+## Step 1: Define the application dependencies
1. Create a directory for the project:
@@ -26,7 +26,7 @@ Define the application dependencies.
$ cd composetest
```
-2. Create a file called `app.py` in your project directory and paste this in:
+2. Create a file called `app.py` in your project directory and paste the following code in:
```python
import time
@@ -62,13 +62,13 @@ Define the application dependencies.
> 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
+ > online, but also makes the 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.
3. Create another file called `requirements.txt` in your project directory and
- paste this in:
+ paste the following code in:
```text
flask
@@ -77,12 +77,11 @@ Define the application dependencies.
## Step 2: Create a Dockerfile
-In this step, you write a Dockerfile that builds a Docker image. The image
+The Dockerfile is used to build a Docker image. The image
contains all the dependencies the Python application requires, including Python
itself.
-In your project directory, create a file named `Dockerfile` and paste the
-following:
+In your project directory, create a file named `Dockerfile` and paste the following code in:
```dockerfile
# syntax=docker/dockerfile:1
@@ -109,6 +108,11 @@ This tells Docker to:
* Copy the current directory `.` in the project to the workdir `.` in the image.
* Set the default command for the container to `flask run`.
+>Important
+>
+>Check that the `Dockerfile` has no file extension like `.txt`. Some editors may append this file extension automatically and which results in an error when you run the application.
+{: .important}
+
For more information on how to write Dockerfiles, see the
[Docker user guide](../develop/index.md)
and the [Dockerfile reference](/engine/reference/builder/).
@@ -132,13 +136,8 @@ services:
This Compose file defines two services: `web` and `redis`.
-### Web service
-
The `web` service uses an image that's built from the `Dockerfile` in the current directory.
-It then binds the container and the host machine to the exposed port, `8000`. This example service uses the default port for
-the Flask web server, `5000`.
-
-### Redis service
+It then binds the container and the host machine to the exposed port, `8000`. This example service uses the default port for the Flask web server, `5000`.
The `redis` service uses a public [Redis](https://registry.hub.docker.com/_/redis/)
image pulled from the Docker Hub registry.
@@ -175,11 +174,7 @@ image pulled from the Docker Hub registry.
2. Enter http://localhost:8000/ in a browser to see the application running.
- If you're using Docker natively on Linux, Docker Desktop for Mac, or Docker Desktop for
- Windows, then the web app should now be listening on port 8000 on your
- Docker daemon host. Point your web browser to http://localhost:8000 to
- find the `Hello World` message. If this doesn't resolve, you can also try
- http://127.0.0.1:8000.
+ If this doesn't resolve, you can also try http://127.0.0.1:8000.
You should see a message in your browser saying:
@@ -346,12 +341,9 @@ container:
$ docker compose down --volumes
```
-At this point, you have seen the basics of how Compose works.
-
-
## Where to go next
-- Next, try the [Sample apps with Compose](samples-for-compose.md)
+- Next, try the [Sample apps with Compose](https://github.com/docker/awesome-compose)
- [Explore the full list of Compose commands](reference/index.md)
-- [Compose configuration file reference](compose-file/index.md)
+- [Explore the 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 512949ec9e12..4ec92ce0140b 100644
--- a/compose/index.md
+++ b/compose/index.md
@@ -10,216 +10,88 @@ redirect_from:
- /compose/completion/
---
->**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.
Then, with a single command, you create and start all the services
-from your configuration. To learn more about all the features of Compose,
-see [the list of features](#features).
+from your configuration.
Compose works in all environments: production, staging, development, testing, as
-well as CI workflows. You can learn more about each case in [Common Use
-Cases](#common-use-cases).
-
-Using Compose is basically a three-step process:
-
-1. Define your app's environment with a `Dockerfile` so it can be reproduced
-anywhere.
-
-2. Define the services that make up your app in `docker-compose.yml`
-so they can be run together in an isolated environment.
-
-3. Run `docker compose up` and the [Docker compose command](#compose-v2-and-the-new-docker-compose-command) starts and runs your entire app. You can alternatively run `docker-compose up` using Compose standalone(`docker-compose` binary).
-
-A `docker-compose.yml` looks like this:
-
-```yaml
-version: "{{ site.compose_file_v3 }}" # optional since v1.27.0
-services:
- web:
- build: .
- ports:
- - "8000:5000"
- volumes:
- - .:/code
- - logvolume01:/var/log
- depends_on:
- - redis
- redis:
- image: redis
-volumes:
- logvolume01: {}
-```
-
-For more information about the Compose file, see the
-[Compose file reference](compose-file/index.md).
-
-Compose has commands for managing the whole lifecycle of your application:
+well as CI workflows. It also has commands for managing the whole lifecycle of your application:
* Start, stop, and rebuild services
* View the status of running services
* Stream the log output of running services
* Run a one-off command on a service
-## Compose V2 and the new `docker compose` command
-
-> Important
->
-> The new Compose V2, which supports the `compose` command as part of the Docker
-> CLI, is now available.
->
-> Compose V2 integrates compose functions into the Docker platform, continuing
-> to support most of the previous `docker-compose` features and flags. You can
-> run Compose V2 by replacing the hyphen (`-`) with a space, using `docker compose`,
-> instead of `docker-compose`.
-{: .important}
-
-If you rely on using Docker Compose as `docker-compose` (with a hyphen), you can
-set up Compose V2 to act as a drop-in replacement of the previous `docker-compose`.
-Refer to the [Installing Compose](install/index.md) section for detailed instructions.
-
-## Context of Docker Compose evolution
-
-Introduction of the [Compose specification](https://github.com/compose-spec/compose-spec){:target="_blank" rel="noopener" class="_"}
-makes a clean distinction between the Compose YAML file model and the `docker-compose`
-implementation. Making this change has enabled a number of enhancements, including
-adding the `compose` command directly into the Docker CLI, being able to "up" a
-Compose application on cloud platforms by simply switching the Docker context,
-and launching of [Amazon ECS](../cloud/ecs-integration.md) and [Microsoft ACI](../cloud/aci-integration.md).
-As the Compose specification evolves, new features land faster in the Docker CLI.
-
-Compose V2 relies directly on the compose-go bindings which are maintained as part
-of the specification. This allows us to include community proposals, experimental
-implementations by the Docker CLI and/or Engine, and deliver features faster to
-users. Compose V2 also supports some of the newer additions to the specification,
-such as [profiles](profiles.md) and [GPU](gpu-support.md) devices.
-
-Compose V2 has been re-written in [Go](https://go.dev), which improves integration
-with other Docker command-line features, and allows it to run natively on
-[macOS on Apple silicon](../desktop/mac/apple-silicon.md), Windows, and Linux,
-without dependencies such as Python.
-
-For more information about compatibility with the compose v1 command-line, see the [docker-compose compatibility list](cli-command-compatibility.md).
-
-
-## Features
-
-The features of Compose that make it effective are:
-
-* [Multiple isolated environments on a single host](#multiple-isolated-environments-on-a-single-host)
-* [Preserve volume data when containers are created](#preserve-volume-data-when-containers-are-created)
-* [Only recreate containers that have changed](#only-recreate-containers-that-have-changed)
-* [Variables and moving a composition between environments](#variables-and-moving-a-composition-between-environments)
-
-### Multiple isolated environments on a single host
-
-Compose uses a project name to isolate environments from each other. You can make use of this project name in several different contexts:
-
-* on a dev host, to create multiple copies of a single environment, such as when you want to run a stable copy for each feature branch of a project
-* on a CI server, to keep builds from interfering with each other, you can set
- the project name to a unique build number
-* on a shared host or dev host, to prevent different projects, which may use the
- same service names, from interfering with each other
-
-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](reference/index.md) or the
-[`COMPOSE_PROJECT_NAME` environment variable](reference/envvars.md#compose_project_name).
-
-The default project directory is the base directory of the Compose file. A custom value
-for it can be defined with the `--project-directory` command line option.
-
-
-### Preserve volume data when containers are created
-
-Compose preserves all volumes used by your services. When `docker compose up`
-runs, if it finds any containers from previous runs, it copies the volumes from
-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](reference/envvars.md) and adjust the necessary environment
-variables for your specific needs.
-
-
-### Only recreate containers that have changed
-
-Compose caches the configuration used to create a container. When you
-restart a service that has not changed, Compose re-uses the existing
-containers. Re-using containers means that you can make changes to your
-environment very quickly.
-
-
-### Variables and moving a composition between environments
-
-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-file/compose-file-v3.md#variable-substitution) for more
-details.
-
-You can extend a Compose file using the `extends` field or by creating multiple
-Compose files. See [extends](extends.md) for more details.
-
-
-## Common use cases
-
-Compose can be used in many different ways. Some common use cases are outlined
-below.
-
-### Development environments
-
-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-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
-(`docker-compose up`).
-
-Together, these features provide a convenient way for developers to get
-started on a project. Compose can reduce a multi-page "developer getting
-started guide" to a single machine readable Compose file and a few commands.
-
-### Automated testing environments
-
-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-file/index.md), you can create and destroy these environments in just a few commands:
-
-```console
-$ docker compose up -d
-$ ./run_tests
-$ docker compose down
-```
-
-### Single host deployments
-
-Compose has traditionally been focused on development and testing workflows,
-but with each release we're making progress on more production-oriented features.
-
-For details on using production-oriented features, see
-[compose in production](production.md) in this documentation.
-
-
-## Release notes
-
-To see a detailed list of changes for past and current releases of Docker
-Compose, refer to the
-[CHANGELOG](https://github.com/docker/compose/blob/master/CHANGELOG.md).
-
-## Getting help
-
-Docker Compose is under active development. If you need help, would like to
-contribute, or simply want to talk about the project with like-minded
-individuals, we have a number of open channels for communication.
+The key features of Compose that make it effective are:
+
+* [Have multiple isolated environments on a single host](features-uses.md#have-multiple-isolated-environments-on-a-single-host)
+* [Preserves volume data when containers are created](features-uses.md#preserves-volume-data-when-containers-are-created)
+* [Only recreate containers that have changed](features-uses.md#only-recreate-containers-that-have-changed)
+* [Supports variables and moving a composition between environments](features-uses.md#supports-variables-and-moving-a-composition-between-environments)
+
+
Explore general FAQs and find out how to give feedback.
+
+
+
+
-* To report bugs or file feature requests: use the [issue tracker on Github](https://github.com/docker/compose/issues).
-* To talk about the project with people in real time: join the
- `#docker-compose` channel on the Docker Community Slack.
-* To contribute code or documentation changes: submit a [pull request on Github](https://github.com/docker/compose/pulls).
diff --git a/compose/install/index.md b/compose/install/index.md
index 27c283651cc0..7601a8a94dd8 100644
--- a/compose/install/index.md
+++ b/compose/install/index.md
@@ -1,54 +1,44 @@
---
description: How to install Docker Compose
keywords: compose, orchestration, install, installation, docker, documentation
-title: Install Docker Compose
+title: Overview
toc_max: 3
redirect_from:
- /compose/compose-desktop/
---
-On this page you can find information on how to get and install Compose.
+This page contains summary information about the available options for getting Docker Compose.
-## Install Compose
+## Installation scenarios
-If you have Docker Desktop, you've got a full Docker installation, including Compose.
+### Scenario one: Install Docker Desktop
-You can check this by clicking on **About Docker Desktop** from the Docker menu {: .inline}.
+The easiest and recommended way to get Docker Compose is to install Docker Desktop. Docker Desktop
+includes Docker Compose along with Docker Engine and Docker CLI which are Compose prerequisites.
-{:width="750px"}
+Docker Desktop is available on:
+- [Linux](../../desktop/install/linux-install.md)
+- [Mac](../../desktop/install/mac-install.md)
+- [Windows](../../desktop/install/windows-install.md)
-### New Docker Installation
+If you have already installed Docker Desktop, you can check which version of Compose you have by selecting **About Docker Desktop** from the Docker menu {: .inline}
-If you haven’t yet installed Docker Desktop:
+### Scenario two: Install the Compose plugin
-{% assign yes = '{: .inline style="height: 14px; margin: 0 auto; align=right"}' %}
+If you already have Docker Engine and Docker CLI installed, you can install the Compose plugin from the command line, by either:
+- [Using Docker's repository](linux.md#install-using-the-repository)
+- [Downloading and installing manually](linux.md#install-the-plugin-manually)
-| Platform | Docker Desktop |
-|:---------------|:------------------------------:|
-|Linux (64-bit) |{{ yes }} [Install](../../desktop/install/linux-install.md)|
-|Mac |{{ yes }} [Install](../../desktop/install/mac-install.md)|
-|Windows |{{ yes }} [Install](../../desktop/install/windows-install.md)|
+>Note
+>
+>This is only available on Linux
+{: .important}
+### Scenario three: Install the Compose standalone
-### Pre-existing Docker Installation
+You can [install the Compose standalone](other.md) on Linux or on Windows Server.
-If you have a Docker installation on Linux to which you want to add the Compose plugin, you can choose one of these options:
-
-* [Install using the repository](./linux.md#install-using-the-repository)
-* [Install the plugin manually](./linux.md#install-the-plugin-manually)
-
-### Other install scenarios
-
-For other options, see [Other install scenarios](./other.md).
-
-
-## Where to go next
-
-- [Getting Started](../gettingstarted.md)
-- [Command line reference](../../reference/index.md)
-- [Compose file reference](../compose-file/index.md)
-- [Sample apps with Compose](../samples-for-compose.md)
-
-## Feedback
-
-We'd love to hear from you about the improvements we've recently made to the Docker Compose installation instructions. Let us know what you think by completing this short [survey](https://survey.alchemer.com/s3/7002962/Compose-Install-Documentation-Feedback){:target="_blank" rel="noopener" class="_"}.
\ No newline at end of file
+>Note
+>
+>This install scenario is no longer supported.
+{: .important}
\ No newline at end of file
diff --git a/compose/install/linux.md b/compose/install/linux.md
index 6573f3400cf0..b23b5e041147 100644
--- a/compose/install/linux.md
+++ b/compose/install/linux.md
@@ -2,30 +2,24 @@
description: How to install Docker Compose on Linux
keywords: compose, orchestration, install, installation, docker, documentation
toc_max: 3
-
-title: Install on Linux
+title: Install the Compose plugin
redirect_from:
- /compose/compose-plugin/
- /compose/compose-linux/
-
---
-On this page you can find instructions on how to install the Compose on Linux from the command line.
-
-## Install Compose
-
-To install Compose:
-* Option 1: [Set up Docker's repository on your Linux system](#install-using-the-repository).
-* Option 2: [Install Compose manually](#install-the-plugin-manually).
+On this page you can find instructions on how to install the Compose plugin on Linux from the command line.
-### Install using the repository
+To install the Compose plugin on Linux, you can either:
+- [Set up Docker's repository on your Linux system](#install-using-the-repository).
+- [Install Compose manually](#install-the-plugin-manually).
> **Note**
>
> These instructions assume you already have Docker Engine and Docker CLI installed and now want to install the Compose plugin.
-For Compose standalone, see [Install Compose Standalone](other.md#install-compose-standalone).
+For Compose standalone, see [Install Compose Standalone](other.md).
-If you have already set up the Docker repository, jump to step 2.
+### Install using the repository
1. Set up the repository. Find distro-specific instructions in:
@@ -36,15 +30,15 @@ If you have already set up the Docker repository, jump to step 2.
[RHEL](../../engine/install/rhel.md/#set-up-the-repository) |
[SLES](../../engine/install/sles.md/#set-up-the-repository).
-2. Update the package index, and install the _latest version_ of Docker Compose:
+2. Update the package index, and install the latest version of Docker Compose:
- * Ubuntu, Debian:
+ * For Ubuntu and Debian, run:
```console
$ sudo apt-get update
$ sudo apt-get install docker-compose-plugin
```
- * RPM-based distros:
+ * For RPM-based distros, run:
```console
$ sudo yum update
@@ -62,15 +56,15 @@ Where `vN.N.N` is placeholder text standing in for the latest version.
#### Update Compose
-To update Compose, run the following commands:
+To update the Compose plugin, run the following commands:
-* Ubuntu, Debian:
+* For Ubuntu and Debian, run:
```console
$ sudo apt-get update
$ sudo apt-get install docker-compose-plugin
```
-* RPM-based distros:
+* For RPM-based distros, run:
```console
$ sudo yum update
@@ -81,7 +75,7 @@ To update Compose, run the following commands:
> **Note**
>
-> This option requires you to manage upgrades manually. We recommend setting up Docker's repository for an easier maintenance.
+> This option requires you to manage upgrades manually. We recommend setting up Docker's repository for easier maintenance.
1. To download and install the Compose CLI plugin, run:
@@ -115,10 +109,3 @@ To update Compose, run the following commands:
$ docker compose version
Docker Compose version {{site.compose_version}}
```
-
-## Where to go next
-
-- [Manage Docker as a non-root user](../../engine/install/linux-postinstall.md)
-- [Command line reference](../../reference/index.md)
-- [Compose file reference](../compose-file/index.md)
-- [Sample apps with Compose](../samples-for-compose.md)
diff --git a/compose/install/other.md b/compose/install/other.md
index 27c80bee2097..d3c38aaf93ff 100644
--- a/compose/install/other.md
+++ b/compose/install/other.md
@@ -2,17 +2,16 @@
description: How to install Docker Compose - Other Scenarios
keywords: compose, orchestration, install, installation, docker, documentation
toc_max: 3
-
-title: Other install Scenarios
+title: Install the Compose standalone
---
-## Install Compose Standalone
+On this page you can find instructions on how to install the Compose standalone on Linux or Windows Server, from the command line.
### On Linux
> **Compose standalone**
>
-> Note that Compose standalone uses the _dash compose_ syntax instead of current's standard syntax (_space compose_).
-For example: type `docker-compose up` when using Compose standalone, instead of `docker compose up`.
+> Note that Compose standalone uses the `-compose` syntax instead of the current standard syntax `compose`.
+>For example type `docker-compose up` when using Compose standalone, instead of `docker compose up`.
1. To download and install Compose standalone, run:
```console
@@ -35,7 +34,7 @@ For example: type `docker-compose up` when using Compose standalone, instead of
Follow these instructions if you are running the Docker daemon and client directly
on Microsoft Windows Server and want to install Docker Compose.
-1. Run a PowerShell as an administrator.
+1. Run PowerShell as an administrator.
When asked if you want to allow this app to make changes to your device, click **Yes** in order to proceed with the installation.
2. GitHub now requires TLS1.2. In PowerShell, run the following:
@@ -46,7 +45,7 @@ When asked if you want to allow this app to make changes to your device, click *
3. Run the following command to download the latest release of Compose ({{site.compose_version}}):
```powershell
- Invoke-WebRequest "https://github.com/docker/compose/releases/download/{{site.compose_version}}/docker-compose-Windows-x86_64.exe" -UseBasicParsing -OutFile $Env:ProgramFiles\Docker\docker-compose.exe
+ Start-BitsTransfer -Source "https://github.com/docker/compose/releases/download/{{site.compose_version}}/docker-compose-Windows-x86_64.exe" -Destination $Env:ProgramFiles\Docker\docker-compose.exe
```
> **Note**
diff --git a/compose/release-notes.md b/compose/release-notes.md
index 50031c4c7f4f..b322d6d46b05 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
+
+(2022-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="_"}.
diff --git a/compose/startup-order.md b/compose/startup-order.md
index 1d33aba5e159..8684e9f67939 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 "$@"
```
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/components/code-blocks.md b/contribute/components/code-blocks.md
index 8e32e3eaefc7..06d238b1b187 100644
--- a/contribute/components/code-blocks.md
+++ b/contribute/components/code-blocks.md
@@ -10,36 +10,41 @@ Rouge provides lots of different code block "hints". If you leave off the hint,
it tries to guess and sometimes gets it wrong. These are just a few hints that
we use often.
-#### Raw, no highlighting
+## Raw
-The raw markup is needed to keep Liquid from interpreting the things with double
+Use the {% raw %}`{% raw %}`{% endraw %} markup tag to prevent Liquid from interpreting double
braces as templating language.
{% raw %}
+````
+{% raw %}
```none
-none with raw
+generic code block without syntax highlighting
$ some command with {{double braces}}
$ some other command
```
+{% endraw %}
+````
{% endraw %}
-#### Raw, Bash
+## Bash
+
+Use the `bash` language code block when you want to a Bash script:
-{% raw %}
```bash
-bash with raw
-$ some command with {{double braces}}
-$ some other command
+#!/usr/bin/bash
+echo "deb https://packages.docker.com/1.12/apt/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
```
-{% endraw %}
-#### Bash
+If you want to illustrate an interactive shell, use `console` instead.
+In cases where you use `console`, make sure to add a dollar character
+for the user sign:
-```bash
+```console
$ echo "deb https://packages.docker.com/1.12/apt/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
```
-#### Go
+## Go
```go
incoming := map[string]interface{}{
@@ -54,7 +59,7 @@ incoming := map[string]interface{}{
}
```
-#### PowerShell
+## PowerShell
```powershell
Install-Module DockerMsftProvider -Force
@@ -63,13 +68,13 @@ Install-Package Docker -ProviderName DockerMsftProvider -Force
Expand-Archive docker-18.09.1.zip -DestinationPath $Env:ProgramFiles -Force
```
-#### Python
+## Python
```python
return html.format(name=os.getenv('NAME', "world"), hostname=socket.gethostname(), visits=visits)
```
-#### Ruby
+## Ruby
```ruby
docker_service 'default' do
@@ -77,7 +82,7 @@ docker_service 'default' do
end
```
-#### JSON
+## JSON
```json
"server": {
@@ -98,13 +103,26 @@ end