Skip to content

Commit 55d0bdb

Browse files
committed
add docker building options http_proxy and https_proxy for building docker image
Signed-off-by: Xiaoxia Liang <xiaoxia.liang@intel.com>
1 parent 57d07fe commit 55d0bdb

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ In the top level directory of the repository, run
5353
```
5454
sudo -E ./build.sh
5555
```
56-
The library and docker image will automatically be built within 'build.sh'.
56+
The library and docker image will automatically be built within `build.sh`. It needs to set `http_proxy` and `https_proxy` enviroment variables before runing `build.sh` to build docker image.
5757

5858
If the user is not root and does not have sudo permission, it is assumed that the user has been added to the Docker cgroup and the user must provide the path to the install directory when building.
5959
```

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ build() (
2424
while [ -n "$*" ]; do
2525
case "$(printf %s "$1" | tr '[:upper:]' '[:lower:]')" in
2626
no_docker) docker_flag=false && shift ;;
27-
*) break ;;
27+
*) break ;;
2828
esac
2929
done
3030
if $docker_flag; then
@@ -58,7 +58,7 @@ build() (
5858
cp build/Library/libraisr.a .
5959

6060
if [ "$docker_flag" = "true" ]; then
61-
docker build -t raisr .
61+
docker build --build-arg http_proxy=${http_proxy} --build-arg https_proxy=${https_proxy} -t raisr .
6262
fi
6363
)
6464

0 commit comments

Comments
 (0)