Uh oh!
There was an error while loading. Please reload this page.
chore: create packages - #840
Conversation
f70f235 to
8d8c774CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
09f3249 to
a74f749CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
thaJeztah
commented
Nov 30, 2021
So IIUC, the idea is for the buildx repository to provide the "recipe" for building the I had a look at what it produces, and noticed that this currently produces static binaries (packaged as ldd /usr/libexec/docker/cli-plugins/docker-buildx
linux-vdso.so.1 (0x00007fffc1dc7000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa7e9f0a000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa7e9b19000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa7ea129000)I know the current buildx binaries we ship in the As to naming of the package, I know we currently use |
thaJeztah
commented
Nov 30, 2021
As to integrating it with the docker-ce-packaging pipeline; we have per-distro channels at download.docker.com, so there's a couple of things we need to look into on how we'll be integrating this;
Given that
|
thaJeztah
commented
Nov 30, 2021
Hmmm.. so "build once and copy" won't work, as the version (including distro etc) is also part of the package's metadata, so I guess we'll have to build for each distro (or at least package for each distro). Of course; not sure if that's an actual issue if the binary is exactly the same for all of them (i.e., upgrading distro would be fine with keeping the "old" package). Here's what's in the cat ./bin/docker-buildx_0.7.0~9-g1250d945_amd64/control/control
Package: docker-buildx
Version: 0:0.7.0~9-g1250d945
Section: default
Priority: optional
Architecture: amd64
Maintainer: Docker <support@docker.com>
Vendor: Docker, Inc
Installed-Size: 51408
Homepage: https://github.com/docker/buildx
Description: Docker Buildx plugin extends build capabilities with BuildKit.cat ./bin/docker-ce-cli_20.10.11~3-0~ubuntu-focal_amd64/control/control
Package: docker-ce-cli
Source: docker-ce
Version: 5:20.10.11~3-0~ubuntu-focal
Architecture: amd64
Maintainer: Docker <support@docker.com>
Installed-Size: 153865
Depends: libc6 (>= 2.4)
Recommends: docker-scan-plugin
Conflicts: docker (<<1.5~), docker-engine, docker-engine-cs, docker.io, lxc-docker, lxc-docker-virtual-packageBreaks: docker-ce (<< 5:0)Replaces: docker-ce (<< 5:0)Section: adminPriority: optionalHomepage: https://www.docker.comDescription: Docker CLI: the open-source application container engine Docker is a product for you to build, ship and run any application as a lightweight container . Docker containers are both hardware-agnostic and platform-agnostic. This means they can run anywhere, from your laptop to the largest cloud compute instance and everything in between - and they don't require you to use a particular language, framework or packaging system. That makes them great building blocks for deploying and scaling web apps, databases, and backend services without depending on a particular stack or provider. |
crazy-max
commented
Dec 16, 2021
Yes that's correct
Not sure but I think it depends on the situation. For a cli plugin like buildx it doesn't make much sense and in the contrary adds a lot of overhead imo.
Sure let me know if it needs to be changed: https://github.com/crazy-max/buildx/blob/d24a0cdae3563b04d7f1a4e3cee93efa0605b2c1/hack/nfpm.yml#L1
For a cli plugin pkg which only "extracts" without using any triggers or pre(post)install scripts it doesn't seem we can hit this case.
Don't think it would work as the distro ver would be included in the release.
We can follow the Debian version scheme sure. Smth like
Good point
I can add a specific ARG to change the release based on the distro.
deb$ dpkg-deb -I bin/docker-buildx_0.7.0~9-g1250d945.m_amd64.deb new Debian package, version 2.0. size 12219872 bytes: control archive=419 bytes. 1 bytes, 0 lines conffiles 306 bytes, 10 lines control 81 bytes, 1 lines md5sums Package: docker-buildx Version: 0:0.7.0~9-g1250d945.m Section: default Priority: optional Architecture: amd64 Maintainer: Docker <support@docker.com> Vendor: Docker Installed-Size: 46008 Homepage: https://github.com/docker/buildx Description: Docker Buildx plugin extends build capabilities with BuildKit.Compared with docker-scan-plugin pkg: $ dpkg-deb -I bin/docker-scan-plugin_0.12.0~debian-bullseye_amd64.deb new Debian package, version 2.0. size 3518216 bytes: control archive=556 bytes. 340 bytes, 11 lines control 164 bytes, 2 lines md5sums Package: docker-scan-plugin Source: docker-ce (5:20.10.12~3-0~debian-bullseye) Version: 0.12.0~debian-bullseye Architecture: amd64 Maintainer: Docker <support@docker.com> Installed-Size: 12946 Enhances: docker-ce-cli Section: admin Priority: optional Homepage: https://github.com/docker/scan-cli-plugin Description: Docker scan cli plugin.rpm$ rpm -qip bin/docker-buildx-0.7.0~9-g1250d945.m.x86_64.rpm Name : docker-buildxEpoch : 0Version : 0.7.0~9-g1250d945.mRelease : 1Architecture: x86_64Install Date: (not installed)Group : Tools/DockerSize : 47112192License : Apache-2.0Signature : (none)Source RPM : docker-buildx-0.7.0~9-g1250d945.m-1.src.rpmBuild Date : Thu Dec 16 11:31:29 2021Build Host : buildkitsandboxRelocations : (not relocatable)Packager : Docker <support@docker.com>Vendor : DockerURL : https://github.com/docker/buildxSummary : Docker Buildx plugin extends build capabilities with BuildKit.Description :Docker Buildx plugin extends build capabilities with BuildKit.Compared with docker-scan-plugin pkg: $ rpm -qip bin/docker-scan-plugin-0.12.0-3.el8.x86_64.rpm warning: bin/docker-scan-plugin-0.12.0-3.el8.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEYName : docker-scan-pluginEpoch : 0Version : 0.12.0Release : 3.el8Architecture: x86_64Install Date: (not installed)Group : Tools/DockerSize : 13247224License : ASL 2.0Signature : RSA/SHA512, Mon Dec 13 15:21:53 2021, Key ID c52feb6b621e9f35Source RPM : docker-scan-plugin-0.12.0-3.el8.src.rpmBuild Date : Mon Dec 13 12:45:11 2021Build Host : c4ca28c21cdfRelocations : (not relocatable)Packager : Docker <support@docker.com>Vendor : DockerURL : https://github.com/docker/scan-cli-plugin/Summary : Docker Scan plugin for the Docker CLIDescription :Docker Scan plugin for the Docker CLI. |
I added the possibility to define a release version for each distro. See https://github.com/crazy-max/buildx/blob/23d8eaffa41e2748b0b7894bb239290352745c4b/docker-bake.hcl#L10-L15 |
63627e8 to
b265f1cComparecrazy-max
commented
Jan 18, 2022
@thaJeztah Last commit publish pkgs to Structure inside the scratch image: |
crazy-max
commented
Feb 16, 2022
Changed pkg name to |
e265687 to
3463f34Compare32de06b to
4c0c88cCompareSigned-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>


Follow-up to our discussion about releasing buildx as a separate package.
I first started to implement this on the docker-ce-packaging repo but the Go version is not the one we want for buildx. I think we should first merge docker/cli#3258.
Creating packages here allows for easier maintenance. In a follow-up we could upload pkgs and update repodata on
download.docker.com(cc @StefanScherer).Test it:
$ docker buildx bake "https://github.com/crazy-max/buildx.git#deb-pkg" pkgcc @thaJeztah@tonistiigi
Signed-off-by: CrazyMax crazy-max@users.noreply.github.com