Chris Crone
47213d9ba1
inspect: Sort annotations and labels on print
...
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-10-23 16:43:53 +02:00
Djordje Lukic
21ed360c78
Pass the context down to http
...
That way we cancel the requests if the users ctrl+c
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-10-23 16:43:53 +02:00
Silvin Lubecki
1cba34f369
Show how many listed elements we print with the total, and added a CTA to use --all flag to show all the elements
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-23 16:43:52 +02:00
Silvin Lubecki
3ddc915421
Renaming
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-23 16:42:56 +02:00
Silvin Lubecki
637e4833d2
Added inspect command, to check more informations on tokens
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-23 16:41:56 +02:00
Silvin Lubecki
d4091b830a
Added update command to activate or deactivate a token and update description
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-23 16:41:21 +02:00
Silvin Lubecki
c39a1ad142
Added tokens management command with
...
- Create command (with --description, --format and --quiet flags)
- List command (with --all and --format flag)
- Revoke command (with --force flag
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-16 14:16:03 +02:00
Silvin Lubecki
70be35782e
Add tokens API CRUD to hub client
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-16 14:14:08 +02:00
Silvin Lubecki
f6367493c0
Added colors on all column headers
...
* Refactored colors: use content colors (title, header, error...) instead of color directly
* Added dependency on github.com/juju/ansiterm which a drop-in replaceable library for tabwriter but compatible with colors
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-15 12:19:10 +02:00
Silvin Lubecki
e86b356eff
Rename import path to github.com/docker/hub-tool
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-14 12:06:42 +02:00
Silvin Lubecki
6de02e4ce2
Improve tag inspect command:
...
- now for a manifest it fetches the config object too, to print more informations (command, entrypoint, command history on each layers, exposed ports, volumes...)
- refactored the whole command
- added a new format "raw" which prints exactly what was returned by the registry, "json" format is a combination of the descriptor, the config object and the manifest
- added color
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-13 16:20:25 +02:00
Silvin Lubecki
912eb7af8b
Enforce user hub loggin uppon hub-tool use
...
Added e2e test
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-12 09:53:09 +02:00
Silvin Lubecki
e546743507
Big refactor: instanciate the hub client in the main so we can factorize creation logic
...
Also removed dependency on dockerCLI to use only streams
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-09 19:39:01 +02:00
Silvin Lubecki
b97c1f9d0b
Refactor: use context for http requests
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-09 15:50:37 +02:00
Silvin Lubecki
df1e88b5fa
Fix wrong layer size in tag inspect command, also added human size for size and fix tabs
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-09 11:46:18 +02:00
Silvin Lubecki
f793e3a22f
Change copyright headers to better fit with the Contributor License Agreement
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-09 10:16:15 +02:00
Silvin Lubecki
d2d4dc7291
Add a new "account" manage command, with one new command "info" to print the current user information and the current hub plan.
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-08 18:19:36 +02:00
Silvin Lubecki
bd3010523c
Add color to the CallToAction
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-08 16:26:14 +02:00
Silvin Lubecki
6e0634a188
Add a CallToAction when listing the tags, if the user is a free user.
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-08 16:26:14 +02:00
Silvin Lubecki
f7eba49e70
Fix --all flag description
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-07 09:51:30 +02:00
Silvin Lubecki
ee9a9cb0b2
Add custom user-agent for better discrimination on the API side.
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-07 09:37:57 +02:00
Silvin Lubecki
fc4ff40fea
Better order direction: direction is optional and ascending by default
...
Added tests
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-06 15:40:48 +02:00
Silvin Lubecki
a92d1f624c
Add --sort flag to specify which column (update or name) user want to sort by
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-05 16:50:55 +02:00
Silvin Lubecki
ae4041012e
Refactor: add an Option pattern to the http requests so sender can customize the request
...
- factorize authorization header
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-05 14:30:18 +02:00
Silvin Lubecki
a8237ebd0f
Remove the plugin part and transform it to a standalone binary
...
Renamed it to hub-tool and refactor to better change the name if needed
Fix the e2d test and simplify the CI
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-02 19:06:27 +02:00
Silvin Lubecki
9d9f0e3a05
Use the last update of the status API, now at the tag level for multi arch images
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-01 17:27:15 +02:00
Silvin Lubecki
861abd4526
Rename inspect --raw flag to --format=json
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-01 17:18:11 +02:00
Silvin Lubecki
82f6f53045
Append repository to the tag name in the ls command
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-01 17:12:20 +02:00
Silvin Lubecki
314bb9db44
Better POSIX compliant, forbid flags after argument
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-01 17:07:04 +02:00
Silvin Lubecki
76ef1526c1
Added flag --all to "repo ls" and "tag ls" commands to fetch all the elements from pagination, otherwise it will only the the 25 first elements.
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-01 16:43:19 +02:00
Silvin Lubecki
0eab61191f
Add --format=json flag to all presenting commands
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-30 18:33:09 +02:00
Silvin Lubecki
5ad657c7e6
Fix printing the full repo name
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-30 16:13:26 +02:00
Silvin Lubecki
4b0f6bd389
Send anonymous statistics when a user runs a command
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-30 15:36:11 +02:00
Silvin Lubecki
221b423fd5
Added tag inspect command to print the raw and pretty print version of manifest/manifest lists
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-24 18:07:16 +02:00
Silvin Lubecki
7d12c35d94
Added last push and last pulled columns.
...
Note: they show the values for the first image, so it works with single arch images, but the value might be misleading for multi-arch images.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-24 15:25:50 +02:00
Silvin Lubecki
759d1e7a70
Use the new status fields in the tag api
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-24 11:31:54 +02:00
Silvin Lubecki
b10b40b7d0
Added a command "docker hub org teams" to list the teams inside an organization
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-23 19:43:34 +02:00
Silvin Lubecki
2f9ef1a525
Add "docker hub org members orga" to list all the members of an organization
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-23 19:25:37 +02:00
Silvin Lubecki
1e1addf29d
Add "docker hub org ls" which lists the organizations the user is part of, the number of teams and members
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-23 19:19:43 +02:00
Silvin Lubecki
4d9b4398a6
Add an optional argument to "docker hub repo ls" so user can specify an organization instead
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-23 17:42:44 +02:00
Silvin Lubecki
c30837ac38
Added "repo rm" command to remove a repository
...
docker hub repo rm user/myrepo
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-23 17:16:04 +02:00
Silvin Lubecki
7a44f6a0ff
Add a "repo ls" command to list all the repositories a user can access.
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-23 16:57:11 +02:00
Silvin Lubecki
a7da18a2c5
Reorder commands and introduce tag manage command:
...
docker hub tag ls REPO
docker hub tag rm REPO:TAG
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-23 15:43:31 +02:00
Silvin Lubecki
0c6eb4574d
Add rmi command to remove a tag
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-23 10:55:13 +02:00
Silvin Lubecki
dfe2047afb
Add a --platforms flag to the ls command to print the OS/ARCH column
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-22 14:31:34 +02:00
Silvin Lubecki
859486902f
Fix null LastUpdated
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-21 18:38:14 +02:00
Silvin Lubecki
bd7cdff931
Handle pagination to print all the tags
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-21 18:37:47 +02:00
Silvin Lubecki
025c710430
Added OS/ARCH column which lists all the platforms
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-21 18:13:32 +02:00
Silvin Lubecki
7d7a94f47b
Fixed multi-arch images digest and size
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-21 18:13:06 +02:00
Silvin Lubecki
d85e1fdd79
Added a list command which prints all the tags of a repository
...
- missing pagination
- missing manifest lists
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-21 10:03:55 +02:00