buildkitd: store state persistently in a volume

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2021-03-02 18:53:15 -08:00
parent 14ff14ea4f
commit 8e9a432caf

View File

@ -15,6 +15,7 @@ const (
version = "v0.8.2" version = "v0.8.2"
imageVersion = image + ":" + version imageVersion = image + ":" + version
containerName = "dagger-buildkitd" containerName = "dagger-buildkitd"
volumeName = "dagger-buildkitd"
) )
func Start(ctx context.Context) (string, error) { func Start(ctx context.Context) (string, error) {
@ -104,6 +105,7 @@ func startBuildkit(ctx context.Context) error {
"run", "run",
"-d", "-d",
"--restart", "always", "--restart", "always",
"-v", volumeName+":/var/lib/buildkit",
"--name", containerName, "--name", containerName,
"--privileged", "--privileged",
imageVersion, imageVersion,