Skip to content

Instantly share code, notes, and snippets.

@canbingzt
Created July 21, 2023 09:34
Show Gist options
  • Select an option

  • Save canbingzt/2d9dc711f0dc2d4c9e9cd1ff71572b27 to your computer and use it in GitHub Desktop.

Select an option

Save canbingzt/2d9dc711f0dc2d4c9e9cd1ff71572b27 to your computer and use it in GitHub Desktop.
docker build using proxy
#!/bin/bash
PROXY_HTTP="http://localhost:1080"
docker build -f Dockerfile \
--network host \
--build-arg HTTP_PROXY=$PROXY_HTTP \
--build-arg HTTPS_PROXY=$PROXY_HTTP \
-t mytag:latest .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment