containerd / containerd/nerdctl

depend_on and healthcheck is ignored when running nerdctl compose up

Open
#2,386 7 comments 18 reactions 0 assignees View on GitHub
area/compose enhancement
Dominant language
Go
Stars
10.4k
Forks
826
Avg merge
1d 23h
Merged PRs (30d)
44

Description

### Description

`depends_on ` and `healthcheck ` are ignored when running nerdctl compose up .

```
$ nerdctl compose up
WARN[0000] Ignoring: service db: [HealthCheck]
WARN[0000] Ignoring: service adminer: depends_on: db: condition service_completed_successfully
INFO[0000] Ensuring image mariadb:11.0.2
...
```

### Steps to reproduce the issue

1. create docker-compose.yaml
```
version: '3.8'

services:

db:
image: mariadb:11.0.2
restart: always
environment:
MARIADB_ROOT_PASSWORD: changeme
MARIADB_DATABASE: testdb
healthcheck:
test: ["CMD", "healthcheck.sh","--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 3
adminer:
image: registry-jpe2.r-local.net/dockerhub/library/adminer:latest
restart: always
ports:
- 8080:8080
depends_on:
db:
condition: service_healthy
```
2. run `nerdctl compose up`
3. adminer should start only if db is up and healthy

### Describe the results you received and expected

depends_on and healthcheck works as expected and documented [here](https://docs.docker.com/compose/startup-order/)

### What version of nerdctl are you using?

Client:
Version: v1.4.0
OS/Arch: linux/arm64
Git commit: 7e8114a82da342cdbec9a518c5c6a1cce58105e9
buildctl:
Version: v0.11.6
GitCommit: 2951a28cd7085eb18979b1f710678623d94ed578

Server:
containerd:
Version: v1.7.0
GitCommit: 1fbd70374134b891f97ce19c70b6e50c7b9f4e0d
runc:
Version: 1.1.7
GitCommit: 860f061b76bb4fc671f0f9e900f7d80ff93d4eb7

### Are you using a variant of nerdctl? (e.g., Rancher Desktop)

Rancher Desktop for macOS

### Host information

Client:
Namespace: default
Debug Mode: false

Server:
Server Version: v1.7.0
Storage Driver: overlayfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Log: fluentd journald json-file syslog
Storage: native overlayfs
Security Options:
seccomp
Profile: default
Kernel Version: 6.1.30-0-virt
Operating System: Alpine Linux v3.18
OSType: linux
Architecture: aarch64
CPUs: 2
Total Memory: 3.824GiB
Name: lima-rancher-desktop
ID: d04401bd-f06e-4f9d-a761-eeefb5e34fc0

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.