0

Is there a way to tell if a DockerHub account is a user or an organization?

For example, I think this Google account is an org. I know this account (mine) is a user. The URL structures are identical, and I haven't been able to find an obvious sign in the UI.

dfarrell07
  • 2,872
  • 2
  • 21
  • 26

1 Answers1

0

Edit: This no longer works. Organizations now provide the same curl result as users.

This is a bit of a hack, but it seems to work.

[~]$ curl -sI "https://hub.docker.com/u/google/" | grep "^Location: " > /dev/null && echo "Organization" || echo "User"
Organization
[~]$ curl -sI "https://hub.docker.com/u/docker/" | grep "^Location: " > /dev/null && echo "Organization" || echo "User"
Organization
[~]$ curl -sI "https://hub.docker.com/u/dfarrell07/" | grep "^Location: " > /dev/null && echo "Organization" || echo "User"
User
[~]$ curl -sI "https://hub.docker.com/u/davetucker/" | grep "^Location: " > /dev/null && echo "Organization" || echo "User"
User
dfarrell07
  • 2,872
  • 2
  • 21
  • 26