You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/containers/{id}/stop Docker Engine API implementation doesn't commit state of stopped container in Docker Engine memory database (e.g. using container.Container.CommitInMemory method like container healthcheck monitoring does, or using container.Container.CheckpointTo method like /containers/{id}/pause API does) which causes subsequent Docker Engine API calls reporting wrong state (running) of already stopped container. Due to this issue is of race condition nature, it can be hard to reproduce (the pause b/w Docker Engine API calls should be small).
State/status of container reported by curl (by /containers/json Docker Engine API) is the same (stopped) as state/status reported by "docker ps" command.
docker version
Client: Docker Engine - Community
Version: 28.2.2
API version: 1.50
Go version: go1.24.3
Git commit: e6534b4
Built: Fri May 30 12:07:27 2025
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 28.2.2
API version: 1.50 (minimum version 1.24)
Go version: go1.24.3
Git commit: 45873be
Built: Fri May 30 12:07:27 2025
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.7.27
GitCommit: 05044ec0a9a75232cad458027ca83437aae3f4da
runc:
Version: 1.2.5
GitCommit: v1.2.5-0-g59923ef
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Description
/containers/{id}/stop Docker Engine API implementation doesn't commit state of stopped container in Docker Engine memory database (e.g. using container.Container.CommitInMemory method like container healthcheck monitoring does, or using container.Container.CheckpointTo method like /containers/{id}/pause API does) which causes subsequent Docker Engine API calls reporting wrong state (
running) of already stopped container. Due to this issue is of race condition nature, it can be hard to reproduce (the pause b/w Docker Engine API calls should be small).Refer to testcontainers/testcontainers-go#3177 for original issue reported for Testcontainers for Go and to testcontainers/testcontainers-go#3177 (comment) for the test reproducing this issue with curl.
Reproduce
Expected behavior
State/status of container reported by curl (by /containers/json Docker Engine API) is the same (
stopped) as state/status reported by "docker ps" command.docker version
Client: Docker Engine - Community Version: 28.2.2 API version: 1.50 Go version: go1.24.3 Git commit: e6534b4 Built: Fri May 30 12:07:27 2025 OS/Arch: linux/amd64 Context: default Server: Docker Engine - Community Engine: Version: 28.2.2 API version: 1.50 (minimum version 1.24) Go version: go1.24.3 Git commit: 45873be Built: Fri May 30 12:07:27 2025 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.27 GitCommit: 05044ec0a9a75232cad458027ca83437aae3f4da runc: Version: 1.2.5 GitCommit: v1.2.5-0-g59923ef docker-init: Version: 0.19.0 GitCommit: de40ad0docker info
Additional Info