Skip to content

Commit 4e1eb29

Browse files
authored
add shortcode (#21972)
<!--Delete sections as needed --> ## Description Adds shortcode and renames the page (have not added an alias as the page has been live for less than 24 hours so does not need one) ## Related issues or tickets <!-- Related issues, pull requests, or Jira tickets --> ## Reviews <!-- Notes for reviewers here --> <!-- List applicable reviews (optionally @tag reviewers) --> - [ ] Technical review - [ ] Editorial review - [ ] Product review
1 parent 86b71d1 commit 4e1eb29

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

content/manuals/compose/how-tos/depent-images.md renamed to content/manuals/compose/how-tos/dependent-images.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ title: Build dependent images
55
weight: 50
66
---
77

8+
{{< summary-bar feature_name="Compose dependent images" >}}
9+
810
To reduce push/pull time and image weight, a common practice for Compose applications is to have services
911
share base layers as much as possible. You will typically select the same operating system base image for
1012
all services. But you also can get one step further sharing image layers when your images share the same
@@ -19,7 +21,6 @@ image and install system package `openssl`.
1921
The recommended approach is to group the shared declaration in a single Dockerfile, and use multi-stage features
2022
so that service images are built from this shared declaration.
2123

22-
2324
Dockerfile:
2425

2526
```dockerfile
@@ -53,7 +54,6 @@ A popular pattern is to reuse a service image as a base image in another service
5354
As Compose does not parse the Dockerfile, it can't automatically detect this dependency
5455
between services to correctly order the build execution.
5556
56-
5757
a.Dockerfile:
5858
5959
```dockerfile
@@ -82,7 +82,6 @@ services:
8282
dockerfile: b.Dockerfile
8383
```
8484
85-
8685
Legacy Docker Compose v1 used to build images sequentially, which made this pattern usable
8786
out of the box. Compose v2 uses BuildKit to optimise builds and build images in parallel
8887
and requires an explicit declaration.
@@ -107,7 +106,6 @@ services:
107106
service_a: "service:a"
108107
```
109108
110-
111109
## Build with Bake
112110
113111
Using [Bake](/manuals/build/bake/_index.md) let you pass the complete build definition for all services

data/summary.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ Compose bridge:
6767
availability: Experimental
6868
Config profiles:
6969
requires: Docker Desktop 4.36 and later
70+
Compose dependent images:
71+
requires: Docker Compose [2.22.0](/manuals/compose/releases/release-notes.md#2220) and later
7072
Compose cgroup:
71-
requires: Docker Compose [2.15.0](/manuals/compose/releases/release-notes.md#2200) and later
73+
requires: Docker Compose [2.15.0](/manuals/compose/releases/release-notes.md#2150) and later
7274
Compose develop:
7375
requires: Docker Compose [2.22.0](/manuals/compose/releases/release-notes.md#2220) and later
7476
Compose driver opts:

0 commit comments

Comments
 (0)