我做了一个 docker-compose 服务,它工作正常。
我安装了 minikube,我可以访问它抛出 Web 界面 http://127.0.0.1:35591/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/#/overview?namespace=default
但是当我尝试在我的 docker 文件夹上做一个“kompose up”时它失败了,见下。
似乎 kompose 尝试推送 docker.io 而不是我本地的 minikube?!
如何配置 kompose 以推送我的本地 minikube ?
INFO Building image 'ubuntu' from directory 'test-docker'
INFO Image 'ubuntu' from directory 'test-docker' built successfully
INFO Pushing image 'library/ubuntu:latest' to registry 'docker.io'
WARN Unable to retrieve .docker/config.json authentication details. Check that 'docker login' works successfully on the command line.: open /home/wizard/.dockercfg: no such file or directory
INFO Authentication credentials are not detected. Will try push without authentication.
INFO Attempting authentication credentials 'docker.io
ERRO Unable to push image 'library/ubuntu:latest' to registry 'docker.io'. Error: denied: requested access to the resource is denied
FATA Error while deploying application: k.Transform failed: Unable to push Docker image for service test: unable to push docker image(s). Check that `docker login` works successfully on the command line```
Try 1 : eval $(minikube docker-env) - Failed
```$ minikube start
minikube v1.11.0 on Ubuntu 18.04
✨ Using the docker driver based on existing profile
Starting control plane node minikube in cluster minikube
Restarting existing docker container for "minikube" ...
Preparing Kubernetes v1.18.3 on Docker 19.03.2 ...
▪ kubeadm.pod-network-cidr=10.244.0.0/16
Verifying Kubernetes components...
Enabled addons: dashboard, default-storageclass, storage-provisioner
Done! kubectl is now configured to use "minikube"
$ eval $(minikube docker-env)
$ kompose up
INFO Build key detected. Attempting to build and push image 'ubuntu'
INFO Building image 'ubuntu' from directory 'striper-docker'
INFO Image 'ubuntu' from directory 'striper-docker' built successfully
INFO Pushing image 'library/ubuntu:latest' to registry 'docker.io'
WARN Unable to retrieve .docker/config.json authentication details. Check that 'docker login' works successfully on the command line.: open /home/wizard/.dockercfg: no such file or directory
INFO Authentication credentials are not detected. Will try push without authentication.
INFO Attempting authentication credentials 'docker.io
ERRO Unable to push image 'library/ubuntu:latest' to registry 'docker.io'. Error: denied: requested access to the resource is denied
FATA Error while deploying application: k.Transform failed: Unable to push Docker image for service striper: unable to push docker image(s). Check that `docker login` works successfully on the command line ```