提交 4659ed88 编写于 作者: L Liangliang He

Merge branch 'image_update' into 'master'

add script to build and update images in registry server

See merge request !1084
#!/bin/bash
set -e
BUILD_DIR_NAME="docker"
CURRENT_DIR_NAME=`basename "$PWD"`
if [ $BUILD_DIR_NAME != $CURRENT_DIR_NAME ]; then
echo "You can run script only in 'mace/docker' directory"
exit 1
fi
# build images
docker build -t registry.cn-hangzhou.aliyuncs.com/xiaomimace/mace-dev-lite ./mace-dev-lite || exit 1
docker build -t registry.cn-hangzhou.aliyuncs.com/xiaomimace/mace-dev ./mace-dev-lite || exit 1
docker build -t registry.cn-hangzhou.aliyuncs.com/xiaomimace/gitlab-runner ./gitlab-runner || exit 1
if grep -lq registry.cn-hangzhou.aliyuncs.com ~/.docker/config.json; then
# update images to repository
docker push registry.cn-hangzhou.aliyuncs.com/xiaomimace/mace-dev-lite || exit 1
docker push registry.cn-hangzhou.aliyuncs.com/xiaomimace/mace-dev || exit 1
docker push registry.cn-hangzhou.aliyuncs.com/xiaomimace/gitlab-runner || exit 1
else
echo "Login docker registry server is needed!"
exit 1
fi
...@@ -50,3 +50,16 @@ Create container with the following command ...@@ -50,3 +50,16 @@ Create container with the following command
registry.cn-hangzhou.aliyuncs.com/xiaomimace/mace-dev-lite registry.cn-hangzhou.aliyuncs.com/xiaomimace/mace-dev-lite
# Execute an interactive bash shell on the container # Execute an interactive bash shell on the container
docker exec -it mace-dev /bin/bash docker exec -it mace-dev /bin/bash
Update images to repository
---------------------------
If you are mace inner developer and need update images in remote repository,
it can be achieved by `docker/update_images.sh` script.
.. code:: sh
cd docker/
./update_images.sh
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册