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

Method new_with_local_builder

lib-engine/src/cmd/docker.rs:282–311  ·  view source on GitHub ↗
(socket_location: Option<Url>)

Source from the content-addressed store, hash-verified

280 }
281
282 pub fn new_with_local_builder(socket_location: Option<Url>) -> Result<Self, DockerError> {
283 let docker = Self::new(socket_location)?;
284
285 // In order to be able to use --cache-from --cache-to for buildkit,
286 // we need to create our specific builder, which is not the default one (aka: the docker one).
287 // Reference doc https://docs.docker.com/engine/reference/commandline/buildx_create
288 let args = vec![
289 "--config",
290 docker.config_path.path().to_str().unwrap_or(""),
291 "buildx",
292 "create",
293 "--name",
294 DEFAULT_BUILDER_NAME,
295 "--buildkitd-flags",
296 "--debug",
297 "--driver-opt",
298 "network=host",
299 "--bootstrap",
300 "--use",
301 ];
302 let _ = docker_exec(
303 &args,
304 &docker.get_all_envs(&[]),
305 &mut |_| {},
306 &mut |_| {},
307 &CommandKiller::never(),
308 );
309
310 Ok(docker)
311 }
312
313 pub fn new_with_kube_builder(
314 socket_location: Option<Url>,

Callers

nothing calls this directly

Calls 2

docker_execFunction · 0.85
get_all_envsMethod · 0.45

Tested by

no test coverage detected