RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1420279 - Not possible to push to Docker Hub with latest docker
Summary: Not possible to push to Docker Hub with latest docker
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Antonio Murdaca
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-08 10:49 UTC by Marek Skalický
Modified: 2019-03-06 00:46 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-26 14:33:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1325 0 normal SHIPPED_LIVE docker bug fix and enhancement update 2017-05-26 18:14:24 UTC

Description Marek Skalický 2017-02-08 10:49:50 UTC
Description of problem:
After upgrade to latest docker (from docker-1.10.x) expected format of .docker/config.json changed.

When I run docker login it still prints "Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one." and I can login with my Docker Hub credentials.

However the result of the command has in .docker/config.json file this format:
{
	"auths": {
                "https://registry.access.redhat.com/v1/": {
                        "auth": "xxxxxxxxxxxxx",
                        "email": "mskalick"
                }
	}
}

So instead of "https://index.docker.io/v1/" it contains "https://registry.access.redhat.com/v1/". Although then is is possible to push to Docker Hub, it is very misleading. And if user have .docker/config.json from previous version, it is not possible to use it (pushing to Docker Hub is unauthorized).

Version-Release number of selected component (if applicable):
docker-1.12.5-14.el7.x86_64

How reproducible:
It happened to me after upgrade from  docker-1.10.3-59.el7 to docker-1.12.5-14.el7.

Actual results:
With docker login done by docker 1.10.x and after upgrade to latest docker it is not possible to push to Docker Hub.

Expected results:
Pushing to Docker Hub is possible after upgrade.

Comment 1 Antonio Murdaca 2017-02-08 10:53:06 UTC
can you please provide commands to reproduce this along with expected and current behavior? The docker login goes to whatever default registry you have configured with --add-registry in /etc/sysconfig/docker so apart from that misleading output about docker ID, a docker login should behave like that with projectatomic/docker.

Comment 2 Marek Skalický 2017-02-08 11:59:03 UTC
How reproducible:
1. system without docker
2. yum install docker-1.10.3-59.el7 && systemctl start docker
3. docker login docker.io (with your Docker Hub credentials) 
  In .docker/config.json there is:
{
	"auths": {
		"https://index.docker.io/v1/": {
			"auth": "xxxxxxxxxx",
			"email": "mskalick"
		}
	}
}

4. Now it is possible to push to personal namespace in Docker Hub
5. yum install docker-1.12.5-14.el7
6. Now it is NOT possible to push to personal namespace in Docker Hub (unauthorized: authentication required; .docker/config.json is the same)

Continues how it works for me:
7. docker login (with your Docker Hub credentials)
  In .docker/config.json there is:
{
	"auths": {
		"https://index.docker.io/v1/": {
			"auth": "xxxxxx",
			"email": "mskalick"
		},
		"https://registry.access.redhat.com/v1/": {
			"auth": "xxxxxx"
		}
	}
}
8. Now it is possible to push to personal namespace in Docker Hub


I am not sure how projectatomic docker should work. So is my example how it should work?

Comment 3 Antonio Murdaca 2017-02-08 12:03:35 UTC
(In reply to Marek Skalický from comment #2)
> How reproducible:
> 1. system without docker
> 2. yum install docker-1.10.3-59.el7 && systemctl start docker
> 3. docker login docker.io (with your Docker Hub credentials) 
>   In .docker/config.json there is:
> {
> 	"auths": {
> 		"https://index.docker.io/v1/": {
> 			"auth": "xxxxxxxxxx",
> 			"email": "mskalick"
> 		}
> 	}
> }
> 
> 4. Now it is possible to push to personal namespace in Docker Hub
> 5. yum install docker-1.12.5-14.el7
> 6. Now it is NOT possible to push to personal namespace in Docker Hub
> (unauthorized: authentication required; .docker/config.json is the same)

How are you pushing in 4. and 6.? can you show me the command? if you're pushing with just "username/imagename" then it shouldn't work in both 4. and 6. and you must push with "docker.io/username/imagename" since the default registry is "registry.access.redhat.com" when pushing unqualified images (w/o the hostname).

Comment 4 Marek Skalický 2017-02-08 12:12:45 UTC
For example with: "docker push docker.io/mskalick/mongodb-32-centos7"

Comment 5 Antonio Murdaca 2017-02-08 12:16:51 UTC
(In reply to Marek Skalický from comment #4)
> For example with: "docker push docker.io/mskalick/mongodb-32-centos7"

so that works with 1.10.3, and .docker/config.json has the docker.io entry but after you upgrade to 1.12.x, even if .docker/config.json has the docker.io entry, that push command doesn't work anymore with unauthorized error?

Comment 6 Marek Skalický 2017-02-08 12:22:42 UTC
(In reply to Antonio Murdaca from comment #5)
> so that works with 1.10.3, and .docker/config.json has the docker.io entry
> but after you upgrade to 1.12.x, even if .docker/config.json has the
> docker.io entry, that push command doesn't work anymore with unauthorized
> error?

Exactly.

docker.io entry have to be renamed to "https://registry.access.redhat.com/v1/" to get pushing to Docker Hub working again.

Comment 17 errata-xmlrpc 2017-05-26 14:33:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1325


Note You need to log in before you can comment on or make changes to this bug.