From c82cdbbfc4e150be17e1db93f7f6454bac2213ca Mon Sep 17 00:00:00 2001 From: mhdzumair Date: Fri, 29 Mar 2024 21:51:42 +0530 Subject: [PATCH] Add proxy settings to docker buildx --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0afe7e0..5e93f4c 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,11 @@ PLATFORMS = linux/amd64,linux/arm64 # Docker image with version as tag DOCKER_IMAGE = $(DOCKER_REPO)/$(IMAGE_NAME):$(VERSION) +# Proxy settings +HTTP_PROXY = http://172.17.0.1:1081 +HTTPS_PROXY = http://172.17.0.1:1081 + + .PHONY: build tag push build: @@ -29,7 +34,7 @@ build: build-multi: @if ! docker buildx ls | grep -q $(BUILDER_NAME); then \ echo "Creating new builder $(BUILDER_NAME)"; \ - docker buildx create --name $(BUILDER_NAME) --use; \ + docker buildx create --name $(BUILDER_NAME) --use --driver-opt env.http_proxy=${HTTP_PROXY} --driver-opt env.https_proxy=${HTTPS_PROXY}; \ else \ echo "Using existing builder $(BUILDER_NAME)"; \ docker buildx use $(BUILDER_NAME); \