diff options
author | fengyuanxing <feng.yuanxing@zte.com.cn> | 2017-09-06 16:07:44 +0800 |
---|---|---|
committer | fengyuanxing <feng.yuanxing@zte.com.cn> | 2017-09-06 16:21:19 +0800 |
commit | 76f3faa67bcd60ec2878afedf3872fb3508769c9 (patch) | |
tree | db4057038fd50df1eebd88d2be251f9f8b14f4cd | |
parent | 5c4dd794745980b8ea526141e0c45ffa4274b940 (diff) |
Modify scripts renaming methods
Change-Id: I87aa34de1817c5060005dd4af7c1029e10a8fa79
Issu-Id: VFC-264
Signed-off-by: fengyuanxing <feng.yuanxing@zte.com.cn>
-rwxr-xr-x | docker/build_image.sh | 8 | ||||
-rwxr-xr-x | docker/docker-entrypoint.sh | 2 | ||||
-rwxr-xr-x | docker/instance_init.sh | 7 |
3 files changed, 6 insertions, 11 deletions
diff --git a/docker/build_image.sh b/docker/build_image.sh index 79695456..2a7943ed 100755 --- a/docker/build_image.sh +++ b/docker/build_image.sh @@ -19,16 +19,16 @@ if [ $HTTPS_PROXY ]; then BUILD_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}" fi -function build_catalog { +function build_image { echo "Start build docker image: ${IMAGE_NAME}" docker build ${BUILD_ARGS} -t ${IMAGE_NAME}:${VERSION} -t ${IMAGE_NAME}:latest . } -function push_catalog { +function push_image { echo "Start push docker image: ${IMAGE_NAME}" docker push ${IMAGE_NAME}:${VERSION} docker push ${IMAGE_NAME}:latest } -build_catalog -push_catalog +build_image +push_image diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 86f9566c..f02c9cce 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -18,7 +18,7 @@ echo "MSB_ADDR=$MSB_ADDR" # Wait for MSB initialization echo "Wait for MSB initialization" -for i in {1..20}; do +for i in {1..5}; do curl -sS -m 1 $MSB_ADDR > /dev/null && break sleep $i done diff --git a/docker/instance_init.sh b/docker/instance_init.sh index b68e621d..622477fc 100755 --- a/docker/instance_init.sh +++ b/docker/instance_init.sh @@ -10,13 +10,8 @@ function start_redis_server { } function start_mysql { - su mysql -c /usr/bin/mysqld_safe & service mysql start - # Wait for mysql to initialize; Set mysql root password - for i in {1..10}; do - sleep $i - bash /usr/bin/mysqladmin -u root password $MYSQL_ROOT_PASSWORD &> /dev/null && break - done + sleep 1 } function create_database { |