This repository was archived by the owner on Jul 18, 2025. It is now read-only.
use proxy vars if set for build#4275
Open
garthy wants to merge 1 commit intodocker-archive-public:masterfrom
Open
use proxy vars if set for build#4275garthy wants to merge 1 commit intodocker-archive-public:masterfrom
garthy wants to merge 1 commit intodocker-archive-public:masterfrom
Conversation
Signed-off-by: Garth Bushell <garth@garthy.com>
dgageot
suggested changes
Nov 15, 2017
Contributor
dgageot
left a comment
There was a problem hiding this comment.
Please make the code easier to read
| fi | ||
|
|
||
| docker build -t $DOCKER_IMAGE_NAME . | ||
| if [[ ${http_proxy:+x} ]]; then |
Contributor
There was a problem hiding this comment.
Why use substitution here and not if [[ -n ${http_proxy} ]]?
| DOCKER_BUILD_ARGS="${DOCKER_BUILD_ARGS} --build-arg http_proxy" | ||
| fi | ||
|
|
||
| if [[ ${https_proxy:+x} ]]; then |
| DOCKER_BUILD_ARGS="${DOCKER_BUILD_ARGS} --build-arg https_proxy" | ||
| fi | ||
|
|
||
| if [[ ${no_proxy:+x} ]]; then |
|
|
||
| DOCKER_IMAGE_NAME="docker-machine-build" | ||
| DOCKER_CONTAINER_NAME="docker-machine-build-container" | ||
| DOCKER_BUILD_ARGS=${DOCKER_BUILD_ARGS:-""} |
Contributor
There was a problem hiding this comment.
Why default to empty string it's empty?
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use any http_proxy variables that are set for the image build when building in a container
Signed-off-by: Garth Bushell garth@garthy.com