Closed jmencak closed 4 years ago
@nalind thoughts?
Not many merges in between, looks like it's a side-effect of #1914?
I thought we asked. @jmencak Do you have a .dockerignore file?
@rhatdan no .dockerignore
file. I was also able to reproduce this on a completely fresh F30 install with buildah-1.12.0. Are you saying you cannot reproduce this?
Narrowed it down to commit 92ff21584fc46fc9d4a1d24577632b53cb97d892. Commit cd88667465a9f4a46daf3c6c2975a9883885c7fe is the last one that works for me fine.
This really looks like a .dockerignore is involved or the code is mistakenly thinking there is a .dockerignore.
This really looks like a .dockerignore is involved or the code is mistakenly thinking there is a .dockerignore.
@saschagrunert PTAL You removed the !excludes.Exclusions() call, could this be triggering the error?
- if excludes == nil || !excludes.Exclusions() {
+ // Copy the whole directory because we do not exclude anything
+ if excludes == nil {
The increased performance delay was expected from my side since #1914 fixes the actual behavior for .dockerignore
files. So we now correctly process the files but gain a slight improvement by skipping directories entirely.
It looks like that all the calls to copyFileWithTar
are slow together. We probably can improve this by copying the whole directly via copyWithTar
...
I see the use case of building inside the container image but in general I think that COPY . .
opens up possible security issues.
Fixed in master.
Description
Version 1.11.5 seems to be the last buildah version which doesn't cause any huge (~80s) delays between COPY and RUN steps when building images with larger amounts of vendored-in files (e.g. OpenShift operator images).
Steps to reproduce the issue:
git clone https://github.com/openshift/cluster-node-tuning-operator
cd cluster-node-tuning-operator
make local-image IMAGE_TAG=origin USE_BUILDAH=1
Describe the results you received: 80s delay between
STEP 3: COPY . .
andSTEP 4: RUN make build
Describe the results you expected: A reasonable delay between the steps as in podman version 1.11.5 and below.
Output of
rpm -q buildah
orapt list buildah
:Output of
buildah version
: Compiled from source on F31.*Output of `cat /etc/release`:**
Output of
uname -a
:Output of
cat /etc/containers/storage.conf
:Output of
cat ~/.config/containers/storage.conf
:Additional information
fuse-overlayfs
and4
are using most CPU during the ~80s delay between steps 3 and 4. Happy to provide their strace output.