Reputation: 641
I'm using the Docker Remote API (API v1.6, Docker 0.6.5). I'm building an image via the POST /build endpoint. FWIW, my client is written in Go. Is there a way to get the image ID of the image I just created without having to parse it out of the streamed response text?
Upvotes: 1
Views: 792
Reputation: 38237
You could give it a name (e.g. repo:tag) during the build and then inspect information about the tagged image using GET /images/(tag name)/json
. (docs)
The json information includes the id, as well as the "config" which shows how the image was created in the first place.
Upvotes: 1