Skip to content

Commit 3a960f1

Browse files
authored
Merge pull request #22960 from docker/published-update
publish updates from main
2 parents 7c0cf7a + 6c5ecca commit 3a960f1

File tree

14 files changed

+233
-4
lines changed

14 files changed

+233
-4
lines changed

_vendor/github.com/docker/compose/v2/docs/reference/compose.md

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_vendor/github.com/docker/compose/v2/docs/reference/compose_volumes.md

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_vendor/github.com/docker/compose/v2/docs/reference/docker_compose.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_volumes.yaml

Lines changed: 52 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
# github.com/moby/buildkit v0.23.1
33
# github.com/docker/buildx v0.25.0
44
# github.com/docker/cli v28.3.0+incompatible
5-
# github.com/docker/compose/v2 v2.37.3
5+
# github.com/docker/compose/v2 v2.38.1
66
# github.com/docker/model-cli v0.1.26-0.20250527144806-15d0078a3c01
77
# github.com/docker/scout-cli v1.15.0

content/manuals/compose/how-tos/multiple-compose-files/include.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,18 @@ services:
3636

3737
This means the team managing `serviceB` can refactor its own database component to introduce additional services without impacting any dependent teams. It also means that the dependent teams don't need to include additional flags on each Compose command they run.
3838

39+
```yaml
40+
include:
41+
- oci://docker.io/username/my-compose-app:latest # use a Compose file stored as an OCI artifact
42+
services:
43+
serviceA:
44+
build: .
45+
depends_on:
46+
- serviceB
47+
```
48+
`include` allows you to reference Compose files from remote sources, such as OCI artifacts or Git repositories.
49+
Here `serviceB` is defined in a Compose file stored on Docker Hub.
50+
3951
## Include and overrides
4052

4153
Compose reports an error if any resource from `include` conflicts with resources from the included Compose file. This rule prevents

content/manuals/compose/releases/release-notes.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,35 @@ aliases:
1313

1414
For more detailed information, see the [release notes in the Compose repo](https://github.com/docker/compose/releases/).
1515

16+
## 2.38.1
17+
18+
{{< release-date date="2025-06-30" >}}
19+
20+
### Bug fixes and enhancements
21+
22+
- Added support of `model_variable` for service `models` configuration
23+
24+
### Update
25+
26+
- Dependencies upgrade: bump compose-go to v2.7.1
27+
28+
## 2.38.0
29+
30+
{{< release-date date="2025-06-30" >}}
31+
32+
### Bug fixes and enhancements
33+
34+
- Introduced support of `models` for LLM configuration
35+
- Added `volumes` command
36+
- Removed `publish` limitation on bind mounts
37+
- Fixed an issue mounting the docker socket to container which doesn't need it
38+
- Fixed an issue with bake hanging on output
39+
40+
### Update
41+
42+
- Dependencies upgrade: bump compose-go to v2.7.0
43+
- Dependencies upgrade: bump docker engine and cli to v28.3.0
44+
1645
## 2.37.3
1746

1847
{{< release-date date="2025-06-24" >}}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
datafolder: compose-cli
3+
datafile: docker_compose_volumes
4+
title: docker compose volumes
5+
layout: cli
6+
---
7+
8+
<!--
9+
Sorry, but the contents of this page are automatically generated from
10+
Docker's source code. If you want to suggest a change to the text that appears
11+
here, you'll need to find the string by searching this repo:
12+
https://github.com/docker/compose
13+
-->
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: Models
3+
description: Learn about the models top-level element
4+
keywords: compose, compose specification, models, compose file reference
5+
weight: 120
6+
---
7+
8+
{{< summary-bar feature_name="Compose models" >}}
9+
10+
The top-level `models` section declares AI models that are used by your Compose application. These models are typically pulled as OCI artifacts, run by a model runner, and exposed as an API that your service containers can consume.
11+
12+
Services can only access models when explicitly granted by a [`models` attribute](services.md#models) within the `services` top-level element.
13+
14+
## Examples
15+
16+
### Example 1
17+
18+
```yaml
19+
services:
20+
app:
21+
image: app
22+
models:
23+
- ai_model
24+
25+
26+
models:
27+
ai_model:
28+
model: ai/model
29+
```
30+
31+
In this basic example:
32+
33+
- The app service uses the `ai_model`.
34+
- The `ai_model` is defined as an OCI artifact (`ai/model`) that is pulled and served by the model runner.
35+
- Docker Compose injects connection info, for example `AI_MODEL_URL`, into the container.
36+
37+
### Example 2
38+
39+
```yaml
40+
services:
41+
app:
42+
image: app
43+
models:
44+
my_model:
45+
endpoint_var: MODEL_URL
46+
47+
models:
48+
my_model:
49+
model: ai/model
50+
context_size: 1024
51+
runtime_flags:
52+
- "--a-flag"
53+
- "--another-flag=42"
54+
```
55+
56+
In this advanced setup:
57+
58+
- The service app references `my_model` using the long syntax.
59+
- Compose injects the model runner's URL as the environment variable `MODEL_URL`.
60+
61+
## Attributes
62+
63+
- `model` (required): The OCI artifact identifier for the model. This is what Compose pulls and runs via the model runner.
64+
- `context_size`: Defines the maximum token context size for the model.
65+
- `runtime_flags`: A list of raw command-line flags passed to the inference engine when the model is started.

content/reference/compose-file/services.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,6 +1288,41 @@ There is a performance penalty for applications that swap memory to disk often.
12881288
- If `memswap_limit` is unset, and `memory` is set, the container can use as much swap as the `memory` setting, if the host container has swap memory configured. For instance, if `memory`="300m" and `memswap_limit` is not set, the container can use 600m in total of memory and swap.
12891289
- If `memswap_limit` is explicitly set to -1, the container is allowed to use unlimited swap, up to the amount available on the host system.
12901290

1291+
### models
1292+
1293+
{{< summary-bar feature_name="Compose models" >}}
1294+
1295+
`models` defines which AI models the service should use at runtime. Each referenced model must be defined under the [`models` top-level element](models.md).
1296+
1297+
```yaml
1298+
services:
1299+
short_syntax:
1300+
image: app
1301+
models:
1302+
- my_model
1303+
long_syntax:
1304+
image: app
1305+
models:
1306+
my_model:
1307+
endpoint_var: MODEL_URL
1308+
model_var: MODEL
1309+
```
1310+
1311+
When a service is linked to a model, Docker Compose injects environment variables to pass connection details and model identifiers to the container. This allows the application to locate and communicate with the model dynamically at runtime, without hard-coding values.
1312+
1313+
#### Long syntax
1314+
1315+
The long syntax gives you more control over the environment variable names.
1316+
1317+
- `endpoint_var` sets the name of the environment variable that holds the model runner’s URL.
1318+
- `model_var` sets the name of the environment variable that holds the model identifier.
1319+
1320+
If either is omitted, Compose automatically generates the environment variable names based on the model key using the following rules:
1321+
1322+
- Convert the model key to uppercase
1323+
- Replace any '-' characters with '_'
1324+
- Append `_URL` for the endpoint variable
1325+
12911326
### `network_mode`
12921327

12931328
`network_mode` sets a service container's network mode.

0 commit comments

Comments
 (0)