fix
This commit is contained in:
parent
57af3338a2
commit
c49235b59d
|
@ -8,5 +8,7 @@ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o ./bin/api-$na
|
|||
docker rmi -f api-$name-srv:latest
|
||||
#打包docker镜像
|
||||
docker build -t api-$name-srv:latest .
|
||||
#上传镜像到dockerhub
|
||||
#把本地镜像load到k8s中(这个适用于无dockerhub镜像仓库情况,需要对应的deployment中的 imagePullPolicy 参数从 Always 变成None)
|
||||
minikube image load api-$name-srv:latest
|
||||
#上传镜像到dockerhub(有dockerhub镜像仓库后打开,且把上面的load image去掉,对应的deployment中的 imagePullPolicy 参数从 None Always)
|
||||
#docker push api-$name-srv:latest
|
Loading…
Reference in New Issue
Block a user