moby/daemon
Justin Chadwell e0b065cc33 daemon: use the registry service config for getting registry hosts
The RegistryHosts lookup function is used by both BuildKit and by the
containerd snapshotter. However, this function differs in behaviour from
the config parser for the RegistryConfig:

- The protocol for insecure registries is treated as significant by
  RegistryHosts, while the RegistryConfig strips this information.
- RegistryConfig validates and deduplicates mirrors.
- RegistryConfig does not parse the insecure-registries as URLs, which
  can lead to parsing opaque URLs as was possible by the RegistryHosts
  function.

This patch updates the lookup function to ensure consistency.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-07-17 12:30:34 +01:00
..
cluster Support for health start interval to swarm mode 2023-07-14 16:47:10 +00:00
config Merge pull request #45737 from pkwarren/pkw/issue-44940-dockerd-json-logs 2023-07-13 19:00:31 -04:00
containerd daemon/containerd: fix assignment to entry in nil map during commit 2023-07-10 10:58:06 +02:00
events daemon/events: use strings.Cut() 2022-12-21 11:09:01 +01:00
graphdriver daemon/graphdriver: format code with gofumpt 2023-06-29 00:31:34 +02:00
images daemon/images: format code with gofumpt 2023-06-29 00:26:42 +02:00
initlayer daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
links daemon/links: use strings.Cut() 2022-12-21 11:09:01 +01:00
listeners Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
logger daemon/logger: format code with gofumpt 2023-06-29 00:31:53 +02:00
names Add canonical import comment 2018-02-05 16:51:57 -05:00
network remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
snapshotter daemon/snapshotter: format code with gofumpt 2023-06-29 00:32:38 +02:00
stats Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
testdata Remove libtrust dep from api 2017-09-06 12:05:19 -04:00
apparmor_default.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
apparmor_default_unsupported.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
archive.go daemon: refactor isOnlineFSOperationPermitted 2022-10-26 12:06:31 -04:00
archive_tarcopyoptions.go Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
archive_tarcopyoptions_unix.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
archive_tarcopyoptions_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
archive_unix.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
archive_windows.go pkg/system: move CheckSystemDriveAndRemoveDriveLetter to pkg/archive 2022-11-29 17:07:48 +01:00
attach.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
auth.go daemon: use types/registry.AuthConfig 2022-07-29 23:05:18 +02:00
cdi.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
changes.go c8d: add support for docker diff 2023-03-30 10:29:07 +01:00
checkpoint.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
cluster.go Fix libnetwork imports 2021-06-01 21:51:23 +00:00
commit.go Add health start interval 2023-07-05 23:44:17 +00:00
configs.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
configs_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
configs_unsupported.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
configs_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
container.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
container_linux.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
container_operations.go rename some variables that shadowed imports or package types 2023-07-03 23:49:57 +02:00
container_operations_unix.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
container_operations_windows.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
container_unix_test.go daemon: consolidate runtimes config validation 2023-06-01 14:45:25 -04:00
container_windows.go daemon: fix capitalization of some functions 2020-04-14 17:22:19 +02:00
containerfs_linux.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
content.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
create.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
create_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
create_unix.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
create_windows.go Fix pruning anon volume created from image config 2023-03-14 11:06:26 +01:00
daemon.go daemon: use the registry service config for getting registry hosts 2023-07-17 12:30:34 +01:00
daemon_linux.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
daemon_linux_test.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
daemon_test.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
daemon_unix.go Merge pull request #45887 from thaJeztah/move_mtu 2023-07-06 09:41:06 -06:00
daemon_unix_test.go daemon: use string-literals for easier grep'ing 2023-07-05 12:27:00 +02:00
daemon_unsupported.go daemon: read-copy-update the daemon config 2023-06-01 14:45:24 -04:00
daemon_windows.go daemon: initBridgeDriver(): pass BridgeConfig, instead of daemon config 2023-07-05 14:43:36 +02:00
daemon_windows_test.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
debugtrap_unix.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
debugtrap_unsupported.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
debugtrap_windows.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
delete.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
delete_test.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
dependency.go Bump swarmkit to v2 2022-04-21 17:33:07 -04:00
devices.go Remove need to set Capabilities for cdi driver 2023-05-16 17:07:58 +02:00
disk_usage.go daemon/disk_usage: Use context aware singleflight 2022-11-29 16:46:19 +01:00
errors.go Merge pull request #44003 from vvoland/invalidfilter 2023-02-22 16:24:47 +00:00
events.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
events_test.go daemon: rename variables that collide with imported package names 2020-04-14 17:22:23 +02:00
exec.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
exec_linux.go daemon: read-copy-update the daemon config 2023-06-01 14:45:24 -04:00
exec_linux_test.go daemon: reload runtimes w/o breaking containers 2023-06-01 14:45:25 -04:00
exec_windows.go daemon: read-copy-update the daemon config 2023-06-01 14:45:24 -04:00
export.go remove GetLayerByID from ImageService interface 2023-03-10 17:54:55 +01:00
health.go Add health start interval 2023-07-05 23:44:17 +00:00
health_test.go daemon: suppress logs in unit tests 2019-10-18 00:57:56 +02:00
id.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
image_service.go c8d: implement classic builder 2023-05-11 11:57:01 +01:00
info.go api/types: move system info types to api/types/system 2023-07-07 13:01:36 +02:00
info_unix.go api/types: move system info types to api/types/system 2023-07-07 13:01:36 +02:00
info_unix_test.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
info_windows.go api/types: move system info types to api/types/system 2023-07-07 13:01:36 +02:00
inspect.go daemon: reload runtimes w/o breaking containers 2023-06-01 14:45:25 -04:00
inspect_linux.go daemon: reload runtimes w/o breaking containers 2023-06-01 14:45:25 -04:00
inspect_test.go daemon: reload runtimes w/o breaking containers 2023-06-01 14:45:25 -04:00
inspect_windows.go c8d: Compute container's layer size 2023-03-08 00:58:02 +01:00
keys.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
keys_unsupported.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
kill.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
licensing.go api/types: move system info types to api/types/system 2023-07-07 13:01:36 +02:00
licensing_test.go api/types: move system info types to api/types/system 2023-07-07 13:01:36 +02:00
links.go Add canonical import comment 2018-02-05 16:51:57 -05:00
list.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
list_test.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
list_unix.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
list_windows.go pkg/containerfs: alias ContainerFS to string 2022-09-23 16:56:52 -04:00
logdrivers_linux.go Support configuration of log cacher. 2020-02-19 17:02:34 -05:00
logdrivers_windows.go Support configuration of log cacher. 2020-02-19 17:02:34 -05:00
logs.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
logs_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
metrics.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
metrics_unix.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
metrics_unsupported.go daemon: read-copy-update the daemon config 2023-06-01 14:45:24 -04:00
monitor.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
mounts.go daemon: daemon.prepareMountPoints(): fix panic if mount is not a volume 2023-07-07 15:31:00 +02:00
names.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
network.go libnet: Return a 403 when overlay network isn't allowed 2023-07-11 12:41:24 +02:00
network_windows.go libnetwork: return concrete-typed *Endpoint 2023-01-13 14:19:06 -05:00
nvidia_linux.go goimports: fix imports 2019-09-18 12:56:54 +02:00
oci_linux.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
oci_linux_test.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
oci_opts.go daemon: ensure OCI options play nicely together 2023-06-06 13:10:05 -04:00
oci_utils.go daemon: ensure OCI options play nicely together 2023-06-06 13:10:05 -04:00
oci_windows.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
oci_windows_test.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
pause.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
prune.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
reload.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
reload_test.go daemon: reload runtimes w/o breaking containers 2023-06-01 14:45:25 -04:00
reload_unix.go daemon: consolidate runtimes config validation 2023-06-01 14:45:25 -04:00
reload_windows.go daemon: reload runtimes w/o breaking containers 2023-06-01 14:45:25 -04:00
rename.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
resize.go Fix npe in exec resize when exec errored 2023-05-28 00:14:47 +00:00
resize_test.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
restart.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
runtime_unix.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
runtime_unix_test.go api/types: move system info types to api/types/system 2023-07-07 13:01:36 +02:00
runtime_windows.go daemon: reload runtimes w/o breaking containers 2023-06-01 14:45:25 -04:00
seccomp_linux.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
seccomp_linux_test.go container: split security options to a SecurityOptions struct 2023-04-29 00:03:37 +02:00
seccomp_unsupported.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
secrets.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
secrets_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
secrets_unsupported.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
secrets_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
start.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
start_unix.go daemon: consolidate runtimes config validation 2023-06-01 14:45:25 -04:00
start_windows.go daemon: reload runtimes w/o breaking containers 2023-06-01 14:45:25 -04:00
stats.go Merge pull request #40478 from cpuguy83/dont-prime-the-stats 2020-04-16 20:57:06 +02:00
stats_collector.go pkg/sysinfo: move MemInfo and ReadMemInfo to a separate package 2023-03-15 17:52:45 +01:00
stats_unix.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
stats_windows.go daemon: move code related to stats together 2023-04-08 19:00:01 +02:00
stop.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
top_unix.go daemon: use string-literals for easier grep'ing 2023-07-05 12:27:00 +02:00
top_unix_test.go daemon: use string-literals for easier grep'ing 2023-07-05 12:27:00 +02:00
top_windows.go daemon: format code with gofumpt 2023-06-29 00:33:03 +02:00
unpause.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
update.go daemon: use string-literals for easier grep'ing 2023-07-05 12:27:00 +02:00
update_linux.go daemon: stop setting container resources to zero 2023-06-06 12:13:05 -04:00
update_linux_test.go daemon: stop setting container resources to zero 2023-06-06 12:13:05 -04:00
update_windows.go Windows: Experimental: Allow containerd for runtime 2019-03-12 18:41:55 -07:00
volumes.go Restore active mount counts on live-restore 2023-06-27 16:33:23 +00:00
volumes_linux.go Fix the several typos detected by github.com/client9/misspell 2018-08-09 00:45:00 +09:00
volumes_linux_test.go daemon: rename variables that collide with imported package names 2020-04-14 17:22:23 +02:00
volumes_unit_test.go volume/mounts: remove "containerOS" argument from NewParser (LCOW code) 2021-07-02 13:51:55 +02:00
volumes_unix.go Support recursively read-only (RRO) mounts 2023-05-26 01:58:24 +09:00
volumes_windows.go Add ADD/COPY --chown flag support to Windows 2018-08-13 21:59:11 -07:00
wait.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
workdir.go Add ADD/COPY --chown flag support to Windows 2018-08-13 21:59:11 -07:00