无法将我的 docker 推送到 Bluemix - 登录错误
Unable to push my docker to Bluemix - Login error
我使用 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
您登录到 Bluemix 伦敦区域并尝试将图像推送到 Bluemix 美国南部区域,这就是 docker push
命令再次要求您提供凭据的原因。
如果您想将图像推送到 Bluemix 美国南部地区,您必须先登录该地区。
请使用以下命令将您的 API 指向 Bluemix 美国南部区域:
$ cf api https://api.ng.bluemix.net
然后再次执行您之前运行的命令,即:
$ cf login
$ cf ic login
$ docker push registry.ng.bluemix.net/eci_test/chargeback:latest
否则,如果您想将镜像推送到 Bluemix 伦敦地区,则必须重新标记镜像名称以匹配伦敦地区:
$ docker tag chargeback:latest registry.eu-gb.bluemix.net/eci_test/chargeback:latest
然后您可以运行 docker push
命令指定新的标记图像。
我使用 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
您登录到 Bluemix 伦敦区域并尝试将图像推送到 Bluemix 美国南部区域,这就是 docker push
命令再次要求您提供凭据的原因。
如果您想将图像推送到 Bluemix 美国南部地区,您必须先登录该地区。
请使用以下命令将您的 API 指向 Bluemix 美国南部区域:
$ cf api https://api.ng.bluemix.net
然后再次执行您之前运行的命令,即:
$ cf login
$ cf ic login
$ docker push registry.ng.bluemix.net/eci_test/chargeback:latest
否则,如果您想将镜像推送到 Bluemix 伦敦地区,则必须重新标记镜像名称以匹配伦敦地区:
$ docker tag chargeback:latest registry.eu-gb.bluemix.net/eci_test/chargeback:latest
然后您可以运行 docker push
命令指定新的标记图像。