diff --git a/crates/kiri/src/daemon/api.rs b/crates/kiri/src/daemon/api.rs index 58c1fe9f..5e19b7c3 100644 --- a/crates/kiri/src/daemon/api.rs +++ b/crates/kiri/src/daemon/api.rs @@ -436,6 +436,8 @@ fn info(engine: &Engine) -> Value { "DefaultRuntime": "kiri", "Runtimes": {"kiri": {"path": "kiri-init"}}, "SecurityOptions": ["name=seccomp,profile=builtin", "name=cgroupns"], + // Compose needs it to attach in `up` and `logs -f` (#346). + "SystemTime": time::rfc3339(std::time::SystemTime::now()), // Not in Docker's /info (the ping's Builder-Version header is), but // tools print it: the classic builder API, served by builder.rs. "BuilderVersion": "1", diff --git a/tests/e2e.sh b/tests/e2e.sh index e7494618..a0a06587 100755 --- a/tests/e2e.sh +++ b/tests/e2e.sh @@ -89,6 +89,8 @@ done t socket-mount-reaches-kiri "Kiri" $D run --rm -v "$SOCK:/var/run/docker.sock" docker:cli docker version --format '{{.Server.Platform.Name}}' t info-os "Kiri" $D info --format '{{.OperatingSystem}}' t info-cgroup "2" $D info --format '{{.CgroupVersion}}' +# Compose's `up` and `logs -f` read the daemon's time before they attach (#346). +t info-system-time "$(date -u +%Y-%m-%dT)" $D info --format '{{.SystemTime}}' section "images" t pull-alpine "alpine:latest" $D pull alpine:latest