Skip to content

Instantly share code, notes, and snippets.

@xav-b
Created April 1, 2016 13:00
Show Gist options
  • Save xav-b/b7eb3347c950a2a287f851afe7f6c8db to your computer and use it in GitHub Desktop.
Save xav-b/b7eb3347c950a2a287f851afe7f6c8db to your computer and use it in GitHub Desktop.
Generate cool release titles from cool docker defaults container names
#! /bin/sh
readonly LIGHT_IMAGE=alpine:latest
generate() {
docker run ${LIGHT_IMAGE} sleep 0
container_id=$(docker ps -a -l -q)
echo "$(docker inspect --format='{{ .Name }}' ${container_id} | tr '_/' ' ')"
docker rm ${container_id} &> /dev/null
}
generate $@
@xav-b
Copy link
Author

xav-b commented Apr 1, 2016

Usage example

(Also, you need Docker installed)

$ ./generate-release-name.sh
dreamy shirley

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment