Skip to content

Instantly share code, notes, and snippets.

@lalyos
Created April 5, 2015 18:59
Show Gist options
  • Save lalyos/940750148725fa8bd623 to your computer and use it in GitHub Desktop.
Save lalyos/940750148725fa8bd623 to your computer and use it in GitHub Desktop.
generate docker-compose.yml by inspecting a running container
docker-yml() {
docker inspect -f $'
{{.Name}}
image: {{.Config.Image}}
entrypoint: {{json .Config.Entrypoint}}
environment: {{range .Config.Env}}
- {{.}}{{end}}
' $1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment