Closed Spindel closed 3 years ago
@vrothberg PTAL
Thanks for reaching out!
The error seems legit to me. --pull
with from scratch
conflict IHMO. @nalind @rhatdan WDYT?
it also happens without "FROM scratch" scratch was just my minimal example.
Thanks for reaching out!
The error seems legit to me.
--pull
withfrom scratch
conflict IHMO. @nalind @rhatdan WDYT?
Ex from our public CI: https://gitlab.com/ModioAB/containers/-/jobs/1251708428
The Dockerfile is this one: https://gitlab.com/ModioAB/containers/-/blob/master/mongodb/Dockerfile
Which is a fairly simple example.
Thanks, I am looking at it now.
Okay, that's Podman-side bug. buildah bud
works just fine.
Could we have a Dockerfile for this. If I run
$ cat Dockerfile
FROM scratch
ARG URL=unknown
$ podman build --no-cache --file=Dockerfile --pull --tag=test/humbug:demo .
STEP 1: FROM scratch
STEP 2: ARG URL=unknown
STEP 3: COMMIT test/humbug:demo
--> 16c63e0ff5c
Successfully tagged localhost/test/humbug:demo
16c63e0ff5c24338ca5aa651991b26632c59b96b231e1142a39a5d6054b00dba
It works for me?
The Dockerfile is this one: https://gitlab.com/ModioAB/containers/-/blob/master/mongodb/Dockerfile
@rhatdan, try this ^ one.
FROM docker.io/centos/mongodb-36-centos7:latest
ARG DATE=unknown
LABEL "se.modio.ci.date"=$DATE
ENV LANG C.UTF-8
ENV LC_CTYPE C.utf8
$ podman --version
podman version 3.2.0-rc1
$ podman build --file=Dockerfile --pull --tag=test/humbug:demo
STEP 1: FROM docker.io/centos/mongodb-36-centos7:latest
Trying to pull docker.io/centos/mongodb-36-centos7:latest...
Getting image source signatures
Copying blob 21fea6b5d8d6 skipped: already exists
Copying blob 23aa851937ef skipped: already exists
Copying blob 1e910e5e32e0 skipped: already exists
Copying blob e5783daef160 skipped: already exists
Copying blob b2cc5146c9c7 skipped: already exists
Copying blob 8b952114afd6 skipped: already exists
Copying blob 0e412082be0c skipped: already exists
Copying blob 93489c8b2192 [--------------------------------------] 0.0b / 0.0b
Copying config 90cc59a937 done
Writing manifest to image destination
Storing signatures
STEP 2: ARG DATE=unknown
--> Using cache 2f1bca23b7a087b96bd5adc11641df589c47913ca2d96dde572de323a7b09ec3
--> 2f1bca23b7a
ERRO[0002] error deleting build container "856a492739ab4e9c26e6aa4fa79ce838b855bcac3319cecfafcb4b2a6c5c0199": identifier is not a container
Error: identifier is not a container: error preparing container for next step: error creating build container: pull policy is always but image has been referred to by ID (2f1bca23b7a087b96bd5adc11641df589c47913ca2d96dde572de323a7b09ec3)
This last example seems to work for me with upstream. I'm not sure what's going on here....
# podman version
API Version: 3.2.0-dev
Go Version: go1.15.8
Git Commit: 6ff56ab50a10e2350013c4ff1bf4b8d5d7b5aa87
Built: Tue May 11 14:00:46 2021
OS/Arch: linux/amd64
# podman build --file=Tomfile --pull --tag=test/humbug:demo
STEP 1: FROM docker.io/centos/mongodb-36-centos7:latest
Getting image source signatures
Copying blob 1e910e5e32e0 done
Copying blob 8b952114afd6 done
Copying blob 23aa851937ef done
Copying blob b2cc5146c9c7 done
Copying blob e5783daef160 done
Copying blob 21fea6b5d8d6 done
Copying blob 0e412082be0c done
Copying blob 93489c8b2192 done
Copying config 90cc59a937 done
Writing manifest to image destination
Storing signatures
STEP 2: ARG DATE=unknown
--> c2e2d40d623
STEP 3: LABEL "se.modio.ci.date"=$DATE
--> d25b7953cde
STEP 4: ENV LANG C.UTF-8
--> 4beeeabec18
STEP 5: ENV LC_CTYPE C.utf8
STEP 6: COMMIT test/humbug:demo
--> 952d97145eb
952d97145ebab2f1ac6bbdb343cef0119258a0b5537b5972af8726696f8f6ed7
I haven't tested with upstream, only with the current fedora (33 and 34) package, which is:
Version: 3.2.0-rc1
API Version: 3.2.0-rc1
Go Version: go1.16.3
Built: Wed May 5 23:03:46 2021
OS/Arch: linux/amd64
I reproduced it successfully and already started looking into it.
I opened https://github.com/containers/buildah/pull/3222 to fix the issue. The extended test will also be executed in Podman once vendored.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
podman build --pull always fails as it attempts to pull intermediate container ID's while building.
Steps to reproduce the issue:
1 .podman build --file=Dockerfile --pull --tag=test/humbug:demo .
Describe the results you received:
Describe the results you expected:
A built container
Additional information you deem important (e.g. issue happens only occasionally):
Fedora 34 with stock podman.
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):