Skip to content

Commit f28d270

Browse files
authored
Merge pull request #49 from aledbf/aledbf/stargz
Build images using stargz
2 parents 40f6078 + 156a280 commit f28d270

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
name: Unit tests
22
on:
3-
push:
4-
branches:
5-
- 'main'
63
pull_request:
4+
push:
75
branches:
8-
- 'main'
6+
- main
97

108
jobs:
119
check-go:
@@ -93,7 +91,7 @@ jobs:
9391
run: |
9492
sudo --non-interactive --shell <<END_SUDO
9593
install -d -m 0750 -o root -g docker /run/buildkit
96-
buildkitd &
94+
buildkitd --oci-worker-snapshotter=stargz &
9795
while ! test -S /run/buildkit/buildkitd.sock; do sleep 0.1; done
9896
chgrp docker /run/buildkit/buildkitd.sock
9997
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)