Pls review v1.
Thanks, Xueliang
On Fri, Jan 15, 2021 at 11:25:26AM +0800, Cao Xueliang wrote:
Before: Manual push image to local docker hub. After: Auto push image to local docker hub, others can use the latest image after deploy.
Signed-off-by: Cao Xueliang caoxl78320@163.com
container/delimiter/build | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/container/delimiter/build b/container/delimiter/build index fc1af95..7d9b437 100755 --- a/container/delimiter/build +++ b/container/delimiter/build @@ -2,4 +2,20 @@ # SPDX-License-Identifier: MulanPSL-2.0+ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
+. ../defconfig.sh
+load_cci_defaults
docker build -t delimiter .
+push_image() +{
- local local_docker_hub="$DOCKER_REGISTRY_HOST:$DOCKER_REGISTRY_PORT"
- local src_tag=delimiter:latest
- local dst_tag="$local_docker_hub/$src_tag"
- docker tag "$src_tag" "$dst_tag"
- docker push "$dst_tag"
+}
+push_image
2.23.0