我使用makefile创建了我的dockers,并检查它是否正确.事实上,我能够运行它,甚至可以毫无问题地上传到Docker Hub.然后我按照建议的步骤将docker上传到Bluemix,但无法执行此操作.我收到一个错误,告诉我我的凭据不正确,虽然我确信它们不是(事实上,我能够使用相同的凭证登录Bluemix网站而没有问题).
请参阅下面我所做的步骤和获得的错误,欢迎任何解决这些问题的建议:
$ cf login API endpoint: https://api.eu-gb.bluemix.net Email> agorostidi Password> Autenticando... OK Org seleccionada agorostidi Space seleccionado dev Endpoint API: https://api.eu-gb.bluemix.net (version de API: 2.40.0) Usuario: andres.gorostidi@gmail.com Org: agorostidi Space: dev MacBook-Pro-de-Andres:apache-docker andres$ cf ic login Client certificates are being retrieved from IBM Containers... Client certificates are being stored in /Users/andres/.ice/certs/... Client certificates are being stored in /Users/andres/.ice/certs/containers-api.eu-gb.bluemix.net/504cc61c-47e2-4528-914a-3def71277eea... OK Client certificates were retrieved. Deleting old configuration file... Checking local Docker configuration... OK Authenticating with registry at host name registry.eu-gb.bluemix.net OK Your container was authenticated with the IBM Containers registry. Your private Bluemix repository is URL: registry.eu-gb.bluemix.net/goros You can choose from two ways to use the Docker CLI with IBM Containers: Option 1: This option allows you to use "cf ic" for managing containers on IBM Containers while still using the Docker CLI directly to manage your local Docker host. Use this Cloud Foundry IBM Containers plug-in without affecting the local Docker environment: Example Usage: cf ic ps cf ic images Option 2: Use the Docker CLI directly. In this shell, override the local Docker environment to connect to IBM Containers by setting these variables. Copy and paste the following commands: Note: Only Docker commands followed by (Docker) are supported with this option. export DOCKER_HOST=tcp://containers-api.eu-gb.bluemix.net:8443 export DOCKER_CERT_PATH=/Users/andres/.ice/certs/containers-api.eu-gb.bluemix.net/504cc61c-47e2-4528-914a-3def71277eea export DOCKER_TLS_VERIFY=1 Example Usage: docker ps docker images MacBook-Pro-de-Andres:apache-docker andres$ docker push registry.ng.bluemix.net/eci_test/chargeback:latest The push refers to a repository [registry.ng.bluemix.net/eci_test/chargeback] (len: 1) Sending image list Please login prior to push: Username: agorostidi Password: Email: andres.gorostidi@gmail.com Error response from daemon: Wrong login/password, please try again
Alex da Silv.. 5
您登录到Bluemix London地区并尝试将图像推送到Bluemix US South区域,这就是为什么docker push
命令再次要求您的凭据.
如果您想将图像推送到Bluemix US South地区,您必须先登录该地区.
请使用以下命令将API指向Bluemix US South区域:
$ cf api https://api.ng.bluemix.net
然后再使用之前运行的命令继续,即:
$ cf login $ cf ic login $ docker push registry.ng.bluemix.net/eci_test/chargeback:latest
否则,如果要将图像推送到Bluemix London区域,则必须重新标记图像名称以匹配伦敦地区:
$ docker tag chargeback:latest registry.eu-gb.bluemix.net/eci_test/chargeback:latest
然后,您可以运行docker push
指定新标记图像的命令.
您登录到Bluemix London地区并尝试将图像推送到Bluemix US South区域,这就是为什么docker push
命令再次要求您的凭据.
如果您想将图像推送到Bluemix US South地区,您必须先登录该地区.
请使用以下命令将API指向Bluemix US South区域:
$ cf api https://api.ng.bluemix.net
然后再使用之前运行的命令继续,即:
$ cf login $ cf ic login $ docker push registry.ng.bluemix.net/eci_test/chargeback:latest
否则,如果要将图像推送到Bluemix London区域,则必须重新标记图像名称以匹配伦敦地区:
$ docker tag chargeback:latest registry.eu-gb.bluemix.net/eci_test/chargeback:latest
然后,您可以运行docker push
指定新标记图像的命令.