Commit 6ce499c
applier: add hack to support docker zstd layers
Before this, buildkit was able to create and push layers of type
vnd.docker.image.rootfs.diff.tar.zstd but if you tried to then pull and
unpack those layers in buildkit, you'd get an error from containerd:
`failed to get stream processor for application/vnd.docker.image.rootfs.diff.tar.zstd: no processor for media-type`
While that media type is not official, support for exporting it was
added to buildkit in the past anyways since it works in practice and is
accepted by many registries. It thus seems logical that buildkit should
also support pulling and unpacking those layers too.
There is support for registering stream processors in containerd, but
those only work when using the OCI worker since it relies on the apply
implementation being in the same process as buildkitd.
As a fallback, we instead just implement a hack that swaps out the
docker zstd media type for the oci one before sending it to containerd.
This works in practice because the two types are compatible.
Signed-off-by: Erik Sipsma <erik@sipsma.dev>1 parent f21a96c commit 6ce499c
File tree
4 files changed
+86
-52
lines changed- client
- util
- compression
- winlayers
4 files changed
+86
-52
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3765 | 3765 | | |
3766 | 3766 | | |
3767 | 3767 | | |
3768 | | - | |
3769 | | - | |
3770 | | - | |
| 3768 | + | |
| 3769 | + | |
| 3770 | + | |
| 3771 | + | |
| 3772 | + | |
| 3773 | + | |
3771 | 3774 | | |
3772 | | - | |
3773 | | - | |
| 3775 | + | |
| 3776 | + | |
3774 | 3777 | | |
3775 | | - | |
3776 | | - | |
| 3778 | + | |
| 3779 | + | |
3777 | 3780 | | |
3778 | | - | |
3779 | | - | |
| 3781 | + | |
| 3782 | + | |
3780 | 3783 | | |
3781 | | - | |
3782 | | - | |
3783 | | - | |
3784 | | - | |
3785 | | - | |
| 3784 | + | |
| 3785 | + | |
| 3786 | + | |
| 3787 | + | |
| 3788 | + | |
3786 | 3789 | | |
3787 | | - | |
| 3790 | + | |
3788 | 3791 | | |
3789 | | - | |
3790 | | - | |
3791 | | - | |
3792 | | - | |
3793 | | - | |
3794 | | - | |
3795 | | - | |
3796 | | - | |
| 3792 | + | |
| 3793 | + | |
| 3794 | + | |
| 3795 | + | |
| 3796 | + | |
| 3797 | + | |
| 3798 | + | |
| 3799 | + | |
| 3800 | + | |
| 3801 | + | |
| 3802 | + | |
| 3803 | + | |
| 3804 | + | |
| 3805 | + | |
3797 | 3806 | | |
3798 | | - | |
3799 | | - | |
| 3807 | + | |
| 3808 | + | |
| 3809 | + | |
| 3810 | + | |
| 3811 | + | |
| 3812 | + | |
| 3813 | + | |
| 3814 | + | |
| 3815 | + | |
| 3816 | + | |
| 3817 | + | |
| 3818 | + | |
| 3819 | + | |
| 3820 | + | |
| 3821 | + | |
| 3822 | + | |
| 3823 | + | |
| 3824 | + | |
| 3825 | + | |
| 3826 | + | |
| 3827 | + | |
3800 | 3828 | | |
3801 | | - | |
3802 | | - | |
3803 | | - | |
3804 | | - | |
| 3829 | + | |
| 3830 | + | |
3805 | 3831 | | |
3806 | | - | |
| 3832 | + | |
| 3833 | + | |
3807 | 3834 | | |
3808 | | - | |
| 3835 | + | |
| 3836 | + | |
3809 | 3837 | | |
3810 | | - | |
3811 | | - | |
| 3838 | + | |
| 3839 | + | |
| 3840 | + | |
3812 | 3841 | | |
3813 | | - | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
3814 | 3845 | | |
3815 | | - | |
3816 | | - | |
3817 | | - | |
3818 | | - | |
3819 | | - | |
3820 | | - | |
3821 | | - | |
3822 | | - | |
3823 | | - | |
| 3846 | + | |
| 3847 | + | |
| 3848 | + | |
| 3849 | + | |
| 3850 | + | |
| 3851 | + | |
3824 | 3852 | | |
3825 | | - | |
3826 | | - | |
3827 | | - | |
| 3853 | + | |
| 3854 | + | |
| 3855 | + | |
| 3856 | + | |
3828 | 3857 | | |
3829 | 3858 | | |
3830 | 3859 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| |||
104 | 103 | | |
105 | 104 | | |
106 | 105 | | |
107 | | - | |
| 106 | + | |
108 | 107 | | |
109 | 108 | | |
110 | 109 | | |
| |||
193 | 192 | | |
194 | 193 | | |
195 | 194 | | |
196 | | - | |
| 195 | + | |
197 | 196 | | |
198 | 197 | | |
199 | 198 | | |
| |||
207 | 206 | | |
208 | 207 | | |
209 | 208 | | |
210 | | - | |
211 | | - | |
| 209 | + | |
| 210 | + | |
212 | 211 | | |
213 | 212 | | |
214 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
40 | 46 | | |
41 | 47 | | |
42 | 48 | | |
| |||
0 commit comments