mirror of
https://github.com/containers/buildah.git
synced 2025-07-30 04:23:09 +03:00
--iidfile: print hash prefix
Prefix the image ID with the hash prefix when using `--iidfile` to be compatible with Docker. The absence of the hash can cause docker-compose to error out. Reported-in: github.com/containers/podman/issues/9260 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
@ -466,7 +466,7 @@ func (b *Builder) Commit(ctx context.Context, dest types.ImageReference, options
|
||||
dest = dest2
|
||||
}
|
||||
if options.IIDFile != "" {
|
||||
if err = ioutil.WriteFile(options.IIDFile, []byte(img.ID), 0644); err != nil {
|
||||
if err = ioutil.WriteFile(options.IIDFile, []byte("sha256:"+img.ID), 0644); err != nil {
|
||||
return imgID, nil, "", err
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user