| Summary: | Cannot recognize the default authentication file created by docker login when pull private image | |||
|---|---|---|---|---|
| Product: | OKD | Reporter: | Wenjing Zheng <wzheng> | |
| Component: | Build | Assignee: | Ben Parees <bparees> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Wenjing Zheng <wzheng> | |
| Severity: | low | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 3.x | CC: | aos-bugs, bparees, dwalsh, haowang, wewang, xiuwang | |
| Target Milestone: | --- | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1308305 (view as bug list) | Environment: | ||
| Last Closed: | 2016-05-12 17:08:53 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Bug Depends On: | ||||
| Bug Blocks: | 1308305 | |||
|
Description
Wenjing Zheng
2015-12-22 11:38:07 UTC
Looks like the environment variables are not set correctly when running docker login.
man docker login
...
You can log into any public or private repository for which you have
credentials. When you log in, the command stores encoded credentials
in $HOME/.docker/config.json on Linux or %USERPROFILE%/.docker/con‐
fig.json on Windows.
this is the same issue being hit by https://bugzilla.redhat.com/show_bug.cgi?id=1302255 will fix via: https://github.com/openshift/origin/pull/6887 verified in
openshift v1.1.1-361-g6408278
kubernetes v1.2.0-alpha.4-851-g4a65fa1
etcd 2.2.2
steps:
1. docker login
2. oc secrets new pull /root/.dockercfg
3. Add the secret to builder service account
4. Add the secret to build strategy in build config file
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "DockerImage",
"name": "docker.io/wewang58/ruby-20-centos7:latest"
},
"pullSecret": {
"name": "pull"
},
5. Build with the file and check the log
can Pulling Docker image docker.io/wewang58/ruby-20-centos7:latest ...
http://pastebin.test.redhat.com/345783
[root@dhcp-128-91 backup]# oc get builds
NAME TYPE FROM STATUS STARTED DURATION
ruby-sample-build-1 Source Git@00cadc3 Complete 11 minutes ago 1m22s
pls ignore the comment #3 devenv-rhel7_3325
Could pull private image with this two apporachs to create secrets
oc secrets new pull ${HOME}/.docker/config.json
or
oc secrets new pull .dockerconfigjson=${HOME}/.docker/config.json
Move bug to verified.
|