Last active
February 29, 2020 01:41
-
-
Save armand1m/e0fc2c28ee8f6f4021a9bfb71fd661d7 to your computer and use it in GitHub Desktop.
Search through docker hub community in a single line bash function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
search_dockerhub() { | |
curl -s "https://hub.docker.com/api/content/v1/products/search?source=community&q=$1&page=1&page_size=10" | jq -r '.summaries[]["name"]' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requirements:
jq
: JSON CLI processorUsage:
~/.bashrc
or~/.zshrc
source ~/.bashrc