Created
April 1, 2016 13:00
-
-
Save xav-b/b7eb3347c950a2a287f851afe7f6c8db to your computer and use it in GitHub Desktop.
Generate cool release titles from cool docker defaults container names
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
#! /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 $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage example
(Also, you need Docker installed)