Make the history created-by field note when a label was unset, or if the
one of the CLI flags that modifies the timestamps in the layer were
used, so that the cache evaluation logic can factor that into account.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Treat the five optional bool flags as optional bool values, allowing for
them to not be set if they weren't explicitly given on the command line.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
When there are no instructions to process, we try to reuse the base
image. When we've been told, out of band, to remove labels or
environment variables, or affect annotations, we still need to, though,
so check for values of more of those flags.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
When suppressing what we think are pulled-up directories at commit-time,
only do that when we're _not_ squashing the image, in which case we
really do need to output it into the one layer that our output image
will have.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
run: after we've picked up the exit status of the "main" process that
we're running, reap anything that was reparented to us before returning.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Now the bud --help output correctly reads that the default behavior when
--pull is not provided at all is "missing", and that the default value
for --pull if explicitly provided but without value is "always".
Fixes#6266.
Signed-off-by: Romain Geissler <romain.geissler@amadeus.com>
Add a test that causes parent directories of mount targets to be "pulled
up" if we're running on top of overlay in a situation where its native
diff method is available, and ensure that we can still avoid adding
those directories to the committed layer when we're the only reason they
were pulled up.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
When Ensure() tells us about the parent directories of a mountpoint
target that it created for us, add them to the list of items that we'll
exclude from the commit unless something else causes them to be
modified.
The "native" overlay diff method just walks the diff directory, so we
can get directories in the committed layer that look exactly like the
ones in the previous layer, depending on the storage driver. And while
it's barely noticeable, we can still control for it.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Have Ensure() also return the parent directories of items that it
created, along with information about them that can be used to filter
them out of the layer at commit-time.
This modifies the signature of Ensure(), but it was added in 1.41.0, and
shouldn't (yet) have any external users.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Add an optional ModTimeNew field to MkdirOptions, for setting the
timestamp on newly-created directories. Note that the timestamps on
parent directories of the topmost newly-created directories are not
something we affect, so they'll be updated as usual.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
... c/common v0.64.0
Bump to c/storage v1.59.0, c/image to v5.36.0, and
c/common to v0.64.0 in preparation for Buildah v1.41.0 and
Podman v5.6.0
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
When building images for `manifest` list using `--platform` same image
is used for multiple platform if base is `scratch` , following PR adds a
check to always verify `platform` of `cache` with `target`.
Closes: https://github.com/containers/podman/issues/18723
Signed-off-by: flouthoc <flouthoc.git@gmail.com>
What type of PR is this?
/kind feature
What this PR does / why we need it:
It implements --link for COPY and ADD instructions and enables the creation of
cachable layers that can be reused independently across builds.
Follows buildkit `--link` specifications
How to verify it
bats tests/bud.bats
Which issue(s) this PR fixes:
Fixes#4325
Does this PR introduce a user-facing change?
Yes, gives extra functionality to Containerfiles
Signed-off-by: Joshua Arrevillaga <2004jarrevillaga@gmail.com>