MCPcopy Create free account
hub / github.com/Qovery/engine / configure_builder_for_http_registries

Method configure_builder_for_http_registries

lib-engine/src/cmd/docker.rs:980–1010  ·  view source on GitHub ↗
(&self, image: &ContainerImage)

Source from the content-addressed store, hash-verified

978 }
979
980 fn configure_builder_for_http_registries(&self, image: &ContainerImage) -> Option<BuilderHandle> {
981 // If the registry is HTTP, we need to create a new buildx config to allow HTTP registry
982 let mut builder = None;
983 if image.registry.scheme() == "http" {
984 let http_registries = format!(
985 "{}:{}",
986 image.registry.host_str().unwrap_or(""),
987 image.registry.port_or_known_default().unwrap_or(80)
988 );
989
990 info!("Docker configure builder for HTTP registry {:?}", http_registries);
991 let now = format!("{}", Uuid::new_v4());
992 builder = self
993 .spawn_builder(
994 &now,
995 &now,
996 NonZeroUsize::new(1).unwrap(),
997 self.builder_location.supported_architectures(),
998 (0, 0),
999 (0, 0),
1000 None,
1001 &CommandKiller::never(),
1002 &[http_registries.as_str()],
1003 &[],
1004 false,
1005 )
1006 .ok();
1007 };
1008
1009 builder
1010 }
1011}
1012
1013fn docker_exec<F, X>(

Callers 2

create_manifestMethod · 0.80

Calls 3

spawn_builderMethod · 0.80
as_strMethod · 0.45

Tested by

no test coverage detected