Last active
October 16, 2022 15:45
-
-
Save knwng/bb5a4ca40265a600186ed2fd5cd51d44 to your computer and use it in GitHub Desktop.
可以放在bashrc/zshrc中使用的bash函数
This file contains 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
// exec bash in docker container | |
function enterc() { | |
docker exec -it $1 /bin/bash | |
}export enterc | |
function docker_get_tags() { | |
curl "https://registry.hub.docker.com/v1/repositories/$1/tags" | jq '.[].name' | |
} | |
export docker_get_tags |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment