Repository navigation
Restart policy unless-stopped no longer working (since 4.42.0) #7744
Copy link
Copy link
Closed
Description
Description
I had several issues since 4.42.0 which has been sorted now. Since the start of testing the versions the policy unless-stopped does no longer work in all our services and this is still the case in 4.44.2.
I wondered why I cannot find any report of this issue and revisited my setup, but it is the same on all containers with different configurations. Is it working for others?
I changed some to always which is still working, but we still want the possibility to manually shut down others.
Reproduce
- Run a container with
restart: unless-stopped - Shutdown Docker
- Start again - container is stopped
Expected behavior
No response
docker version
Client:
Version: 28.3.2
API version: 1.51
Go version: go1.24.5
Git commit: 578ccf6
Built: Wed Jul 9 16:12:57 2025
OS/Arch: darwin/arm64
Context: desktop-linux
Server: Docker Desktop 4.44.2 (202017)
Engine:
Version: 28.3.2
API version: 1.51 (minimum version 1.24)
Go version: go1.24.5
Git commit: e77ff99
Built: Wed Jul 9 16:13:56 2025
OS/Arch: linux/arm64
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
Client:
Version: 28.3.2
Context: desktop-linux
Debug Mode: false
Plugins:
ai: Docker AI Agent - Ask Gordon (Docker Inc.)
Version: v1.9.11
Path: /Users/user/.docker/cli-plugins/docker-ai
buildx: Docker Buildx (Docker Inc.)
Version: v0.26.1-desktop.1
Path: /Users/user/.docker/cli-plugins/docker-buildx
cloud: Docker Cloud (Docker Inc.)
Version: v0.4.18
Path: /Users/user/.docker/cli-plugins/docker-cloud
compose: Docker Compose (Docker Inc.)
Version: v2.39.1-desktop.1
Path: /Users/user/.docker/cli-plugins/docker-compose
debug: Get a shell into any image or container (Docker Inc.)
Version: 0.0.42
Path: /Users/user/.docker/cli-plugins/docker-debug
desktop: Docker Desktop commands (Docker Inc.)
Version: v0.2.0
Path: /Users/user/.docker/cli-plugins/docker-desktop
extension: Manages Docker extensions (Docker Inc.)
Version: v0.2.29
Path: /Users/user/.docker/cli-plugins/docker-extension
init: Creates Docker-related starter files for your project (Docker Inc.)
Version: v1.4.0
Path: /Users/user/.docker/cli-plugins/docker-init
mcp: Docker MCP Plugin (Docker Inc.)
Version: v0.13.0
Path: /Users/user/.docker/cli-plugins/docker-mcp
model: Docker Model Runner (EXPERIMENTAL) (Docker Inc.)
Version: v0.1.36
Path: /Users/user/.docker/cli-plugins/docker-model
offload: Docker Offload (Docker Inc.)
Version: v0.4.18
Path: /Users/user/.docker/cli-plugins/docker-offload
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
Version: 0.6.0
Path: /Users/user/.docker/cli-plugins/docker-sbom
scout: Docker Scout (Docker Inc.)
Version: v1.18.3
Path: /Users/user/.docker/cli-plugins/docker-scout
WARNING: Plugin "/Users/user/.docker/cli-plugins/docker-dev" is not valid: failed to fetch metadata: fork/exec /Users/user/.docker/cli-plugins/docker-dev: no such file or directory
Server:
Containers: 117
Running: 17
Paused: 0
Stopped: 100
Images: 1137
Server Version: 28.3.2
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
CDI spec directories:
/etc/cdi
/var/run/cdi
Discovered Devices:
cdi: docker.com/gpu=webgpu
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 05044ec0a9a75232cad458027ca83437aae3f4da
runc version: v1.2.5-0-g59923ef
init version: de40ad0
Security Options:
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.10.14-linuxkit
Operating System: Docker Desktop
OSType: linux
Architecture: aarch64
CPUs: 10
Total Memory: 15.6GiB
Name: docker-desktop
ID: e74a1e7d-7ce3-446c-bdfe-acd096583874
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Labels:
com.docker.desktop.address=unix:///Users/user/Library/Containers/com.docker.docker/Data/docker-cli.sock
Experimental: false
Insecure Registries:
hubproxy.docker.internal:5555
::1/128
127.0.0.0/8
Live Restore Enabled: false
WARNING: DOCKER_INSECURE_NO_IPTABLES_RAW is setDiagnostics ID
6C233321-53F5-42B6-92CB-A3FCC5FD3B74/20250818103007
Additional Info
No response
Reactions are currently unavailable
Activity
simonberger commentedon Aug 29, 2025
Tested 4.45.0, regression is still in.
From the tag changes the bug had been reproduced? Is this something which will be fixed in the next versions or do we have to find ways to handle this somehow outside of docker for now?
djs55 commentedon Sep 8, 2025
Thanks for the reports. I've got a test build with a potential fix if you'd like to give it a try:
Let me know how it goes!
simonberger commentedon Sep 8, 2025
@djs55 thank you for the build
I tested it with several of our services and the
unless-stoppedpolicy works great again like before 4.42.0 :)chaizeg commentedon Sep 25, 2025
Closing this issue because a fix has been released in Docker Desktop
4.47.0. See the release notes for more details.fix: AI 리뷰 반영 - jq 부재 fail-closed, heredoc 이후 push 누락, 실패 요약