visit
Photo by Aron Yigin on Unsplash
One such occasion was my introduction to R article
, in which we used Visual Studio Code and the terminal to run the R script
.
It would have been much easier to use something like RStudio
, which we did for graphs, but nothing wrong with learning a little command line now and then.
Before we can start, we will need to install the hub-tool
.
Download the package for your system.
In my case, it is the amd64
for Linux. Once downloaded, unzip the tar file. Now that it is unzipped, we can go navigate to the directory via the command line. While in the hub-tool
directory, we can run the help to see our options.
./hub-tool --help
./hub-tool login
Now we can go down the line and learn about each option. To gain information about the account, such as the owner’s name, the plan, the limits, joined date, etc., use the following command:
./hub-tool account info
For the rate-limiting information on the account, use the following:
./hub-tool account rate-limiting
Next down the list is the help feature, which we previously used.
./hub-tool org
Org is used to list the organizations. To list the basics, use the ls command like such:
./hub-tool org ls
./hub-tool org members <MemberName>
./hub-tool org teams <TeamName>
./hub-tool repo
As you can see, we can first list our repositories:
./hub-tool repo ls
Another option is we can remove a repository with the following:
./hub-tool repo rm <RepositoryName>
./hub-tool tag
We can now list the tags for a repository. You will need the name of the repository to review:
./hub-tool tag ls <RepositoryName>
Next with tags, we can inspect those in a repository. This includes data such as where it manifests, the configuration, and the layers. This one will not include a screenshot, as it includes private paths and information.
./hub-tool tag inspect <RepositoryName>
./hub-tool tag rm <RepositoryName>
./hub-tool token
We will first need to create a token:
./hub-tool token create
With a token created, we can review them using a list:
./hub-tool token ls
Next, we can inspect the specifics on that token:
./hub-tool token inspect <TokenName>
As we saw the active was true, we could deactivate the token if desired:
./hub-tool token deactivate <TokenName>
If we do want the token reactivated, we can also do that using a similar command:
./hub-tool token activate <TokenName>
Like with everything else, we could also use the remove option when the token is no longer needed. This action takes username authentication as well.
./hub-tool token rm <TokenName>
./hub-tool version
The final option is the logout option:
./hub-tool logout
Even though the Docker interface is strong and useful, for managing repositories I could see myself this CLI again. Although there are not very many options currently, I enjoyed diving in and learning more about the Docker Hub-tool.
Until next time, cheers!
References: