mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Use the mirror in China for Azure China environment
Signed-off-by: Liz Zhang <lizzha@microsoft.com> Use the mirror in China for Azure China environment Signed-off-by: Liz Zhang <lizzha@microsoft.com> Update option name to --mirror Signed-off-by: Liz Zhang <lizzha@microsoft.com> Update indent and change variable name Signed-off-by: Liz Zhang <lizzha@microsoft.com>
This commit is contained in:
parent
601004e1a7
commit
451979a368
1 changed files with 21 additions and 0 deletions
|
@ -34,6 +34,27 @@ pgp.mit.edu
|
||||||
keyserver.ubuntu.com
|
keyserver.ubuntu.com
|
||||||
"
|
"
|
||||||
|
|
||||||
|
mirror=''
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
--mirror)
|
||||||
|
mirror="$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Illegal option $1"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift $(( $# > 0 ? 1 : 0 ))
|
||||||
|
done
|
||||||
|
|
||||||
|
case "$mirror" in
|
||||||
|
AzureChinaCloud)
|
||||||
|
apt_url="https://mirror.azure.cn/docker-engine/apt"
|
||||||
|
yum_url="https://mirror.azure.cn/docker-engine/yum"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
command_exists() {
|
command_exists() {
|
||||||
command -v "$@" > /dev/null 2>&1
|
command -v "$@" > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue