Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.