From 8e9a432cafa93a2838e59d32a7494c3d911c2c3e Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Tue, 2 Mar 2021 18:53:15 -0800 Subject: [PATCH] buildkitd: store state persistently in a volume Signed-off-by: Andrea Luzzardi --- pkg/buildkitd/buildkitd.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/buildkitd/buildkitd.go b/pkg/buildkitd/buildkitd.go index 1a5cf901..7900762f 100644 --- a/pkg/buildkitd/buildkitd.go +++ b/pkg/buildkitd/buildkitd.go @@ -15,6 +15,7 @@ const ( version = "v0.8.2" imageVersion = image + ":" + version containerName = "dagger-buildkitd" + volumeName = "dagger-buildkitd" ) func Start(ctx context.Context) (string, error) { @@ -104,6 +105,7 @@ func startBuildkit(ctx context.Context) error { "run", "-d", "--restart", "always", + "-v", volumeName+":/var/lib/buildkit", "--name", containerName, "--privileged", imageVersion,