podman: Regression: 1.2.0: 'build -t' tags even on error
# cat Dockerfile
FROM alpine
ENV FOO=bar
RUN /bin/false
# podman build -t foo .
STEP 1: FROM alpine
STEP 2: MAINTAINER foo@bar.com
--> fe28c78afc45d14fce6320c9e13ec29fcf0f1826b26402c9560dda55ee815eef
STEP 3: FROM fe28c78afc45d14fce6320c9e13ec29fcf0f1826b26402c9560dda55ee815eef
STEP 4: RUN /bin/false
Error: error building at step {Env:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin] Command:run Args:[/bin/false] Flags:[] Attrs:map[] Message:RUN /bin/false Original:RUN /bin/false}: error while running runtime: exit status 1
So far so good, but:
# podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/foo latest a3a4692e40b7 5 seconds ago 5.8 MB
(expected: an unnamed <none> image, not a named tag)
Only happens with multiple layers; does not fail with simple FROM alpine\nRUN false.
podman-1.2.0-2.git3bd528e.fc29.x86_64
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 27 (22 by maintainers)
Commits related to this issue
- Remove images/containers created in bud failure case When a Dockerfile had clauses that caused a commit to occur, creating an image, and then had an error in other clauses before the final commit, th... — committed to TomSweeneyRedHat/buildah by TomSweeneyRedHat 5 years ago
- Remove images/containers created in bud failure case When a Dockerfile had clauses that caused a commit to occur, creating an image, and then had an error in other clauses before the final commit, th... — committed to TomSweeneyRedHat/buildah by TomSweeneyRedHat 5 years ago
- Remove images/containers created in bud failure case When a Dockerfile had clauses that caused a commit to occur, creating an image, and then had an error in other clauses before the final commit, th... — committed to TomSweeneyRedHat/buildah by TomSweeneyRedHat 5 years ago
No that works for me. I want to cut a new containers/storage and containers/image as well and get them vendored into buildah
And no sooner write that then light dawns on marblehead. Vendoring is not the issue. The reason it works in buildah is --layers==false by default, in podman --layers=true by default. The images isn’t left behind if
podman build --layers=false -t foo .is used, so something has changed in the layer handling.