Skip to content

Instantly share code, notes, and snippets.

@knwng
Last active October 16, 2022 15:45
Show Gist options
  • Save knwng/bb5a4ca40265a600186ed2fd5cd51d44 to your computer and use it in GitHub Desktop.
Save knwng/bb5a4ca40265a600186ed2fd5cd51d44 to your computer and use it in GitHub Desktop.
可以放在bashrc/zshrc中使用的bash函数
// 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