Skip to content

Conversation

@haytok
Copy link
Member

@haytok haytok commented Jan 10, 2026

In the current implementation, specifying an invalid string for the --pull option of the nerdctl compose create command causes it to fall back to missing, allowing the image to be pulled as shown below.

$ sudo nerdctl compose create --pull foo
WARN[0000] Ignoring: service svc0: pull_policy: "foo"
INFO[0000] Ensuring image alpine
...
INFO[0004] Creating container fix-compose-pull-policy-with-invalid-option-svc0-1

On the other hand, docker compose returns the following error in a similar situation.

$ docker compose create --pull foo
invalid --pull option "foo"

This commit fixes it to be compatible with docker compose.

In the current implementation, specifying an invalid string for the --pull
option of the nerdctl compose create command causes it to fall back to
missing, allowing the image to be pulled as shown below.

```
$ sudo nerdctl compose create --pull foo
WARN[0000] Ignoring: service svc0: pull_policy: "foo"
INFO[0000] Ensuring image alpine
...
INFO[0004] Creating container fix-compose-pull-policy-with-invalid-option-svc0-1
```

On the other hand, docker compose returns the following error in a similar
situation.

```
$ docker compose create --pull foo
invalid --pull option "foo"
```

This commit fixes it to be compatible with docker compose.

Signed-off-by: Hayato Kiwata <[email protected]>
@ChengyuZhu6 ChengyuZhu6 added this to the v2.3.0 milestone Jan 10, 2026
Copy link
Member

@ChengyuZhu6 ChengyuZhu6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ChengyuZhu6 ChengyuZhu6 merged commit da0a27f into containerd:main Jan 10, 2026
63 of 68 checks passed
@haytok
Copy link
Member Author

haytok commented Jan 10, 2026

Thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants