-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: create packages #840
Conversation
f70f235
to
8d8c774
Compare
09f3249
to
a74f749
Compare
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 |
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
|
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-package
Breaks: docker-ce (<< 5:0)
Replaces: docker-ce (<< 5:0)
Section: admin
Priority: optional
Homepage: https://www.docker.com
Description: 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. |
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-buildx
Epoch : 0
Version : 0.7.0~9-g1250d945.m
Release : 1
Architecture: x86_64
Install Date: (not installed)
Group : Tools/Docker
Size : 47112192
License : Apache-2.0
Signature : (none)
Source RPM : docker-buildx-0.7.0~9-g1250d945.m-1.src.rpm
Build Date : Thu Dec 16 11:31:29 2021
Build Host : buildkitsandbox
Relocations : (not relocatable)
Packager : Docker <support@docker.com>
Vendor : Docker
URL : https://github.com/docker/buildx
Summary : 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: NOKEY
Name : docker-scan-plugin
Epoch : 0
Version : 0.12.0
Release : 3.el8
Architecture: x86_64
Install Date: (not installed)
Group : Tools/Docker
Size : 13247224
License : ASL 2.0
Signature : RSA/SHA512, Mon Dec 13 15:21:53 2021, Key ID c52feb6b621e9f35
Source RPM : docker-scan-plugin-0.12.0-3.el8.src.rpm
Build Date : Mon Dec 13 12:45:11 2021
Build Host : c4ca28c21cdf
Relocations : (not relocatable)
Packager : Docker <support@docker.com>
Vendor : Docker
URL : https://github.com/docker/scan-cli-plugin/
Summary : Docker Scan plugin for the Docker CLI
Description :
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
b265f1c
Compare
@thaJeztah Last commit publish pkgs to Structure inside the scratch image: |
Changed pkg name to |
e265687
to
3463f34
Compare
32de06b
to
4c0c88c
Compare
Signed-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" pkg
cc @thaJeztah @tonistiigi
Signed-off-by: CrazyMax crazy-max@users.noreply.github.com