1. 使用eval $(minikube docker-env)设置环境变量
2. docker build -t imageName .
3.使用国内镜像源:
minikube ssh
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://registry.docker-cn.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker