diff --git a/selenium/build-dev.sh b/selenium/build-dev.sh index 003096d27..62e70f397 100755 --- a/selenium/build-dev.sh +++ b/selenium/build-dev.sh @@ -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 diff --git a/selenium/build.sh b/selenium/build.sh index 660d1bcb4..8fa630a2c 100755 --- a/selenium/build.sh +++ b/selenium/build.sh @@ -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"