Skip to content

Commit 24a286d

Browse files
committed
Build images using stargz
1 parent 40f6078 commit 24a286d

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
run: |
9494
sudo --non-interactive --shell <<END_SUDO
9595
install -d -m 0750 -o root -g docker /run/buildkit
96-
buildkitd &
96+
buildkitd --oci-worker-snapshotter=stargz &
9797
while ! test -S /run/buildkit/buildkitd.sock; do sleep 0.1; done
9898
chgrp docker /run/buildkit/buildkitd.sock
9999
END_SUDO

pkg/dazzle/build.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,11 @@ func (p *ProjectChunk) buildAsBase(ctx context.Context, dest reference.Named, se
500500
{
501501
Type: "image",
502502
Attrs: map[string]string{
503-
"name": dest.String(),
504-
"push": "true",
503+
"name": dest.String(),
504+
"push": "true",
505+
"compression": "estargz",
506+
"oci-mediatypes": "true",
507+
"force-compression": "true",
505508
},
506509
},
507510
},
@@ -685,8 +688,11 @@ func (p *ProjectChunk) buildImage(ctx context.Context, tpe ChunkImageType, sess
685688
{
686689
Type: "image",
687690
Attrs: map[string]string{
688-
"name": tgt.String(),
689-
"push": "true",
691+
"name": tgt.String(),
692+
"push": "true",
693+
"compression": "estargz",
694+
"oci-mediatypes": "true",
695+
"force-compression": "true",
690696
},
691697
},
692698
},

0 commit comments

Comments
 (0)