Created
July 21, 2023 09:34
-
-
Save canbingzt/2d9dc711f0dc2d4c9e9cd1ff71572b27 to your computer and use it in GitHub Desktop.
docker build using proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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