From d054d1a9ba9ade81bfc62f34887c4c5416789c1b Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Mon, 9 Oct 2023 17:01:44 +0800 Subject: [PATCH] fix --- fs_package_docker_image.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs_package_docker_image.sh b/fs_package_docker_image.sh index 096f8b13..a2b5e68c 100755 --- a/fs_package_docker_image.sh +++ b/fs_package_docker_image.sh @@ -8,9 +8,6 @@ cp /opt/server.fusen.3718.cn.pem ./ cp /opt/server.fusen.3718.cn.key ./ #构建二进制文件 CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o ./bin/api-$name-srv ./$name.go -#删除之前旧的镜像 -docker rmi -f api-$name-srv:latest -docker rmi -f registry.cn-hangzhou.aliyuncs.com/fusen-test/fusen_docker_hub:latest #打包docker镜像 docker build -t api-$name-srv:latest . #删除临时复制进来的文件 @@ -21,3 +18,6 @@ rm ./server.fusen.3718.cn.key docker tag api-$name-srv:latest registry.cn-hangzhou.aliyuncs.com/fusen-test/$name:latest #推送到阿里云镜像库(测试环境,正式把命名空间fusentest改成fusen) docker push registry.cn-hangzhou.aliyuncs.com/fusen-test/$name:latest +#上传了的镜像 +docker rmi -f api-$name-srv:latest +docker rmi -f registry.cn-hangzhou.aliyuncs.com/fusen-test/$name:latest