Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Pass proxy conf to docker build context (#261)
Browse files Browse the repository at this point in the history
Pass proxy conf (linux env var) to docker build context #249
  • Loading branch information
M4nouel authored Jul 17, 2020
1 parent cd5f054 commit f51caf7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions selenium/build-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ tag="selenoid/"$image_name":"$tag_version
dir_name="/tmp/$(uuidgen | sed -e 's|-||g')"
mkdir -p "$dir_name"
additional_docker_args=""
if [ -n "$http_proxy" -a -n "$https_proxy" ]; then
additional_docker_args+="--build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy "
fi
if [ -n "$HTTP_PROXY" -a -n "$HTTPS_PROXY" ]; then
additional_docker_args+="--build-arg http_proxy=$HTTP_PROXY --build-arg https_proxy=$HTTPS_PROXY "
fi
if [ "$browser" == "firefox/local" -o "$browser" == "firefox/apt" ]; then
requires_java_value=""
if [ "$requires_java" == "true" ]; then
Expand Down
6 changes: 6 additions & 0 deletions selenium/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ mkdir -p "$dir_name"
pushd "$dir_name"
template_file="Dockerfile.driver.tmpl"
additional_docker_args=""
if [ -n "$http_proxy" -a -n "$https_proxy" ]; then
additional_docker_args+="--build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy "
fi
if [ -n "$HTTP_PROXY" -a -n "$HTTPS_PROXY" ]; then
additional_docker_args+="--build-arg http_proxy=$HTTP_PROXY --build-arg https_proxy=$HTTPS_PROXY "
fi
if [ "$mode" == "chromedriver" ]; then
download_chromedriver "$3"
additional_docker_args+="--label driver=chromedriver:$3"
Expand Down

0 comments on commit f51caf7

Please sign in to comment.