From 953f0ec03ac0ddb6a2b04981cb446146b3dc45e6 Mon Sep 17 00:00:00 2001 From: Alex Idowu Date: Sat, 12 Aug 2023 16:39:37 +0100 Subject: [PATCH] Enable/disable Docker TLS verification based on value in options --- src/nixpacks/builder/docker/docker_image_builder.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nixpacks/builder/docker/docker_image_builder.rs b/src/nixpacks/builder/docker/docker_image_builder.rs index d65828ef3..b0f0cfe53 100644 --- a/src/nixpacks/builder/docker/docker_image_builder.rs +++ b/src/nixpacks/builder/docker/docker_image_builder.rs @@ -157,7 +157,11 @@ impl DockerImageBuilder { } if let Some(value) = &self.options.docker_tls_verify { - env::set_var("DOCKER_TLS_VERIFY", value); + if value == "1" { + env::set_var("DOCKER_TLS_VERIFY", value); + } else { + env::remove_var("DOCKER_TLS_VERIFY"); // Clear the variable to disable TLS verification + } } if self.options.inline_cache {