12 Commits

Author SHA1 Message Date
Tonis Tiigi
47e852f061 image: pull/load/save attestation manifest and signatures with image
Updates docker pull to pull related attestation manifest and
any signatures for that manifest in cosign referrer objects.

These objects are transferred with the image when running
docker save and docker load and can be used to identify
the image in future updates.

Push is not updated atm as the currect push semantics
in containerd mode do not have correct immutability
guaranteed and don't work with image indexes.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-11-12 07:53:46 -08:00
Derek McGowan
f74e5d48b3 Create github.com/moby/moby/v2 module
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-31 10:13:29 -07:00
Derek McGowan
7bfb804dbe Move registry to daemon/pkg/registry
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-24 12:11:51 -07:00
Sebastiaan van Stijn
5318877858 daemon: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:13 +02:00
Derek McGowan
0aa8fe0bf9 Update to containerd v2.0.2, buildkit v0.19.0-rc2
Update buildkit version to commit which uses 2.0

Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-01-15 14:09:30 +01:00
Sebastiaan van Stijn
2c000b8ac4 daemon: Daemon.RegistryHosts: use internal method to get daemon config
The Daemon.Config() option was added to expose the Config outside of the
daemon package. Limit the use of that function to that purpose and use
the internal, non-exported functions within the daemon itself; this makes
it easier to see if there's still external consumers of the Config()
method.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-11-28 16:32:51 +01:00
Sebastiaan van Stijn
da5e86a82b daemon: gofumpt code
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-11-28 10:03:46 +01:00
Derek McGowan
2aaae08ade Cleanup legacy mirror string to registry host
Move the conversion to its own function and add unit tests.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-10-25 12:44:44 -07:00
Derek McGowan
b3569ebd5a Add HTTP fallback to all insecure registries
Note that while it is not safe to use http fallback on non-localhost
registries, this can be avoided using the new host directories. The
previous legacy insecure configuration is ambiguous and less secure.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-10-25 12:44:44 -07:00
Derek McGowan
1c34581812 Use daemon config to check for legacy config
Use the daemon's configuration to check whether the legacy registry
configuration is used. Only attempt to merge with the legacy
configuration if it has been provided. This avoids merging in based on
a defaulted legacy config.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-10-25 12:44:44 -07:00
Derek McGowan
8b4cb6f58c Update host resolver to use containerd host config
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-10-25 12:44:43 -07:00
Derek McGowan
7c087c3267 Fork buildkit resolver logic to daemon package
This logic is going to be updated to use the new containerd resolver and
needs all the logic handling resolution in the package where it is used.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-10-22 07:50:59 -07:00