From 8177e153d6c96d785044f085574633a45aca95d0 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Fri, 19 Jul 2024 13:31:04 +0200 Subject: [PATCH] buildx(history): check docker daemon is running before exporting Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- src/buildx/history.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/buildx/history.ts b/src/buildx/history.ts index c28b12e8..ae227d89 100644 --- a/src/buildx/history.ts +++ b/src/buildx/history.ts @@ -50,6 +50,9 @@ export class History { if (!(await Docker.isAvailable())) { throw new Error('Docker is required to export a build record'); } + if (!(await Docker.isDaemonRunning())) { + throw new Error('Docker daemon is not running, skipping build record export'); + } if (!(await this.buildx.versionSatisfies('>=0.13.0'))) { throw new Error('Buildx >= 0.13.0 is required to export a build record'); }