diff --git a/_config.yml b/_config.yml index 0642a1415601..a758d7521c60 100644 --- a/_config.yml +++ b/_config.yml @@ -21,8 +21,8 @@ exclude: ["_scripts", "apidocs/layouts", "Gemfile", "hooks", "index.html", "404. latest_engine_api_version: "1.40" docker_ce_version: "19.03" docker_ee_version: "19.03" -compose_version: "1.25.4" -compose_file_v3: "3.7" +compose_version: "1.25.5" +compose_file_v3: "3.8" compose_file_v2: "2.4" machine_version: "0.16.0" distribution_version: "2.7" diff --git a/_config_authoring.yml b/_config_authoring.yml index 6dd919ce49fe..a760cd975429 100644 --- a/_config_authoring.yml +++ b/_config_authoring.yml @@ -24,8 +24,8 @@ exclude: ["_scripts", "apidocs/layouts", "Gemfile", "hooks", "index.html", "404. latest_engine_api_version: "1.40" docker_ce_version: "19.03" docker_ee_version: "19.03" -compose_version: "1.25.4" -compose_file_v3: "3.7" +compose_version: "1.25.5" +compose_file_v3: "3.8" compose_file_v2: "2.4" machine_version: "0.16.0" distribution_version: "2.7" diff --git a/_data/toc.yaml b/_data/toc.yaml index 3d147646a5c3..31ac76e3b051 100644 --- a/_data/toc.yaml +++ b/_data/toc.yaml @@ -1100,10 +1100,10 @@ manuals: title: Getting started - path: /compose/swarm/ title: Using Compose with Swarm - - path: /compose/env-file/ - title: Environment file - path: /compose/environment-variables/ title: Environment variables in Compose + - path: /compose/env-file/ + title: Environment file - path: /compose/extends/ title: Extend services in Compose - path: /compose/networking/ diff --git a/_includes/content/compose-matrix.md b/_includes/content/compose-matrix.md index 2311cec94dba..e0d486fdbf1c 100644 --- a/_includes/content/compose-matrix.md +++ b/_includes/content/compose-matrix.md @@ -2,6 +2,7 @@ This table shows which Compose file versions support specific Docker releases. | **Compose file format** | **Docker Engine release** | | ------------------- | ------------------ | +| 3.8 | 19.03.0+ | | 3.7 | 18.06.0+ | | 3.6 | 18.02.0+ | | 3.5 | 17.12.0+ | diff --git a/compose/compose-file/index.md b/compose/compose-file/index.md index aa82d631e69c..6b8588199db4 100644 --- a/compose/compose-file/index.md +++ b/compose/compose-file/index.md @@ -796,6 +796,29 @@ services: replicas: 6 ``` +#### max_replicas_per_node + +If the service is `replicated` (which is the default), [limit the number of replicas](/engine/reference/commandline/service_create.md#specify-maximum-replicas-per-node---replicas-max-per-node) +that can run on an node at any time. + +> **[Version 3.8](compose-versioning.md#version-3) and above.** + +When there are more tasks requested than running nodes, an error `no suitable node (max replicas per node limit exceed)` is raised. + +```yaml +version: "{{ site.compose_file_v3 }}" +services: + worker: + image: dockersamples/examplevotingapp_worker + networks: + - frontend + - backend + deploy: + mode: replicated + replicas: 6 + max_replicas_per_node: 1 +``` + #### resources Configures resource constraints. diff --git a/compose/django.md b/compose/django.md index 32f78e79edea..07f55215de13 100644 --- a/compose/django.md +++ b/compose/django.md @@ -60,23 +60,27 @@ and a `docker-compose.yml` file. (You can use either a `.yml` or `.yaml` extensi expose. See the [`docker-compose.yml` reference](/compose/compose-file/index.md) for more information on how this file works. -9. Add the following configuration to the file. +9. Add the following configuration to the file. ```none - version: '3' - - services: - db: - image: postgres - web: - build: . - command: python manage.py runserver 0.0.0.0:8000 - volumes: - - .:/code - ports: - - "8000:8000" - depends_on: - - db + version: '3' + + services: + db: + image: postgres + environment: + - POSTGRES_DB=postgres + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=postgres + web: + build: . + command: python manage.py runserver 0.0.0.0:8000 + volumes: + - .:/code + ports: + - "8000:8000" + depends_on: + - db ``` This file defines two services: The `db` service and the `web` service. @@ -138,21 +142,24 @@ In this section, you set up the database connection for Django. 1. In your project directory, edit the `composeexample/settings.py` file. -2. Replace the `DATABASES = ...` with the following: - - DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql', - 'NAME': 'postgres', - 'USER': 'postgres', - 'HOST': 'db', - 'PORT': 5432, - } - } - - These settings are determined by the - [postgres](https://hub.docker.com/_/postgres) Docker image - specified in `docker-compose.yml`. +2. Replace the `DATABASES = ...` with the following: + + # setting.py + + DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'postgres', + 'USER': 'postgres', + 'PASSWORD': 'postgres', + 'HOST': 'db', + 'PORT': 5432, + } + } + + These settings are determined by the + [postgres](https://hub.docker.com/_/postgres) Docker image + specified in `docker-compose.yml`. 3. Save and close the file. diff --git a/compose/production.md b/compose/production.md index 31233765ea3f..5022a2a05cc6 100644 --- a/compose/production.md +++ b/compose/production.md @@ -20,8 +20,8 @@ production. These changes may include: - Removing any volume bindings for application code, so that code stays inside the container and can't be changed from outside - Binding to different ports on the host -- Setting environment variables differently, such as when you need to decrease the verbosity of - logging, or to enable email sending) +- Setting environment variables differently, such as reducing the verbosity of + logging, or to specify settings for external services such as an email server - Specifying a restart policy like `restart: always` to avoid downtime - Adding extra services such as a log aggregator diff --git a/compose/release-notes.md b/compose/release-notes.md index e9c8c42c9646..43fa70e6f51b 100644 --- a/compose/release-notes.md +++ b/compose/release-notes.md @@ -7,6 +7,17 @@ redirect_from: - /release-notes/docker-compose/ --- +## 1.25.5 +(2020-04-10) + +### Features + +- Bumped OpenSSL from 1.1.1d to 1.1.1f. + +- Added Compose version 3.8. + + - Limited service scale to the size specified by the field `deploy.placement.max_replicas_per_node`. + ## 1.25.4 (2020-02-03) diff --git a/config/formatting.md b/config/formatting.md index e916e845bae9..2004c85f34a1 100644 --- a/config/formatting.md +++ b/config/formatting.md @@ -25,6 +25,15 @@ docker inspect --format '{{join .Args " , "}}' container ``` {% endraw %} +## table + +`table` specifies which fields you want to see its output. + +{% raw %} +``` +docker image list --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}\t{{.Size}}" +``` +{% endraw %} ## json diff --git a/docker-hub/webhooks.md b/docker-hub/webhooks.md index 58263419f0cd..f7193400df27 100644 --- a/docker-hub/webhooks.md +++ b/docker-hub/webhooks.md @@ -1,6 +1,6 @@ --- description: Docker Hub Webhooks -keywords: Docker, webhookds, hub, builds +keywords: Docker, webhooks, hub, builds title: Docker Hub Webhooks --- diff --git a/ee/ucp/kubernetes/storage/use-nfs-volumes.md b/ee/ucp/kubernetes/storage/use-nfs-volumes.md index fbffb1485a27..df4d27f62477 100644 --- a/ee/ucp/kubernetes/storage/use-nfs-volumes.md +++ b/ee/ucp/kubernetes/storage/use-nfs-volumes.md @@ -64,7 +64,7 @@ spec: To deploy the pod, and ensure that it started up correctly, use the [kubectl](../../user-access/kubectl/) command line tool. ```bash -$ kubectl create -f nfsinapod.yaml +$ kubectl create -f nfs-in-a-pod.yaml $ kubectl get pods NAME READY STATUS RESTARTS AGE diff --git a/engine/examples/dotnetcore.md b/engine/examples/dotnetcore.md index 9e076d342834..725afb523807 100644 --- a/engine/examples/dotnetcore.md +++ b/engine/examples/dotnetcore.md @@ -42,7 +42,7 @@ tutorial](https://www.asp.net/get-started) to initialize a project or clone our the `Dockerfile` to use the DLL file of your project. ```dockerfile -FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env +FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env WORKDIR /app # Copy csproj and restore as distinct layers @@ -54,7 +54,7 @@ COPY . ./ RUN dotnet publish -c Release -o out # Build runtime image -FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 +FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 WORKDIR /app COPY --from=build-env /app/out . ENTRYPOINT ["dotnet", "aspnetapp.dll"] diff --git a/engine/install/debian.md b/engine/install/debian.md index 0d36996a81ea..1260033d4571 100644 --- a/engine/install/debian.md +++ b/engine/install/debian.md @@ -22,8 +22,8 @@ To get started with Docker Engine on Debian, make sure you To install Docker Engine, you need the 64-bit version of one of these Debian or Raspbian versions: -- Ubuntu Buster 10 (stable) -- Ubuntu Stretch 9 / Raspbian Stretch +- Debian Buster 10 (stable) +- Debian Stretch 9 / Raspbian Stretch Docker Engine is supported on `x86_64` (or `amd64`), `armhf`, and `arm64` architectures. diff --git a/engine/swarm/configs.md b/engine/swarm/configs.md index ff4e04faef6b..1deaa1261f7e 100644 --- a/engine/swarm/configs.md +++ b/engine/swarm/configs.md @@ -136,7 +136,7 @@ However, the `configs` key is not supported for `docker compose`. See This simple example shows how configs work in just a few commands. For a real-world example, continue to -[Intermediate example: Use configs with a Nginx service](#advanced-example-use-configs-with-a-nginx-service). +[Advanced example: Use configs with a Nginx service](#advanced-example-use-configs-with-a-nginx-service). 1. Add a config to Docker. The `docker config create` command reads standard input because the last argument, which represents the file to read the