Skip to content

Commit

Permalink
Merge pull request #49 from aledbf/aledbf/stargz
Browse files Browse the repository at this point in the history
Build images using stargz
  • Loading branch information
kylos101 authored Mar 22, 2022
2 parents 40f6078 + 156a280 commit f28d270
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: Unit tests
on:
push:
branches:
- 'main'
pull_request:
push:
branches:
- 'main'
- main

jobs:
check-go:
Expand Down Expand Up @@ -93,7 +91,7 @@ jobs:
run: |
sudo --non-interactive --shell <<END_SUDO
install -d -m 0750 -o root -g docker /run/buildkit
buildkitd &
buildkitd --oci-worker-snapshotter=stargz &
while ! test -S /run/buildkit/buildkitd.sock; do sleep 0.1; done
chgrp docker /run/buildkit/buildkitd.sock
END_SUDO
Expand Down
14 changes: 10 additions & 4 deletions pkg/dazzle/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,11 @@ func (p *ProjectChunk) buildAsBase(ctx context.Context, dest reference.Named, se
{
Type: "image",
Attrs: map[string]string{
"name": dest.String(),
"push": "true",
"name": dest.String(),
"push": "true",
"compression": "estargz",
"oci-mediatypes": "true",
"force-compression": "true",
},
},
},
Expand Down Expand Up @@ -685,8 +688,11 @@ func (p *ProjectChunk) buildImage(ctx context.Context, tpe ChunkImageType, sess
{
Type: "image",
Attrs: map[string]string{
"name": tgt.String(),
"push": "true",
"name": tgt.String(),
"push": "true",
"compression": "estargz",
"oci-mediatypes": "true",
"force-compression": "true",
},
},
},
Expand Down

0 comments on commit f28d270

Please sign in to comment.