fix(make,buildx): 使用 buildx 编译时,拉镜像到本地

This commit is contained in:
Zhang Dongliang
2020-12-28 14:32:08 +08:00
parent 4f9d6d2005
commit 3d9d34ac15

View File

@@ -77,7 +77,8 @@ build_image() {
local tag=$1
local file=$2
local path=$3
docker buildx build -t "$tag" -f "$2" "$3"
docker buildx build -t "$tag" -f "$2" "$3" --push
docker pull "$tag"
}
buildx_and_push() {
@@ -89,11 +90,6 @@ buildx_and_push() {
docker pull "$tag"
}
push_image() {
local tag=$1
docker push "$tag"
}
build_process() {
local component=$1
build_bin $component
@@ -105,7 +101,6 @@ build_process() {
fi
build_image $img_name $DOCKER_DIR/Dockerfile.$component $SRC_DIR
push_image "$img_name"
}
build_process_with_buildx() {