You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that podman build on Windows takes a huge amount of time to prepare just the context.
It turned out that my Containerignore file didn't work at all.
Huge git repository and build cache are included in the build context.
Removing leading slashes fixed the problem.
Steps to reproduce the issue
Steps to reproduce the issue
Use forward slash in ignorefile
I had ignorefile like this
/.git/
/target/
Build
Describe the results you received
It takes a long time to prepare the context when the context is huge
Describe the results you expected
It shouldn't take a long time to prepare
podman info output
host:
arch: amd64buildahVersion: 1.38.0cgroupControllers:
- cpuset
- cpu
- cpuacct
- blkio
- memory
- devices
- freezer
- net_cls
- perf_event
- net_prio
- hugetlb
- pids
- rdma
- misccgroupManager: cgroupfscgroupVersion: v1conmon:
package: conmon-2.1.12-2.fc40.x86_64path: /usr/bin/conmonversion: 'conmon version 2.1.12, commit: 'cpuUtilization:
idlePercent: 99.34systemPercent: 0.18userPercent: 0.48cpus: 16databaseBackend: sqlitedistribution:
distribution: fedoravariant: containerversion: "40"eventLogger: journaldfreeLocks: 2025hostname: sclee-PCidMappings:
gidmap: nulluidmap: nullkernel: 5.15.167.4-microsoft-standard-WSL2linkmode: dynamiclogDriver: journaldmemFree: 29683224576memTotal: 33573638144networkBackend: netavarknetworkBackendInfo:
backend: netavarkdns:
package: aardvark-dns-1.13.1-1.fc40.x86_64path: /usr/libexec/podman/aardvark-dnsversion: aardvark-dns 1.13.1package: netavark-1.13.1-1.fc40.x86_64path: /usr/libexec/podman/netavarkversion: netavark 1.13.1ociRuntime:
name: crunpackage: crun-1.19.1-1.fc40.x86_64path: /usr/bin/crunversion: |- crun version 1.19.1 commit: 3e32a70c93f5aa5fea69b50256cca7fd4aa23c80 rundir: /run/crun spec: 1.0.0 +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJLos: linuxpasta:
executable: /usr/bin/pastapackage: passt-0^20241211.g09478d5-1.fc40.x86_64version: | pasta 0^20241211.g09478d5-1.fc40.x86_64 Copyright Red Hat GNU General Public License, version 2 or later <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.remoteSocket:
exists: truepath: unix:///run/podman/podman.sockrootlessNetworkCmd: pastasecurity:
apparmorEnabled: falsecapabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOTrootless: falseseccompEnabled: trueseccompProfilePath: /usr/share/containers/seccomp.jsonselinuxEnabled: falseserviceIsRemote: trueslirp4netns:
executable: ""package: ""version: ""swapFree: 8578301952swapTotal: 8589934592uptime: 138h 54m 20.00s (Approximately 5.75 days)variant: ""plugins:
authorization: nulllog:
- k8s-file
- none
- passthrough
- journaldnetwork:
- bridge
- macvlan
- ipvlanvolume:
- localregistries:
search:
- docker.iostore:
configFile: /usr/share/containers/storage.confcontainerStore:
number: 1paused: 0running: 0stopped: 1graphDriverName: overlaygraphOptions:
overlay.imagestore: /usr/lib/containers/storageoverlay.mountopt: nodev,metacopy=ongraphRoot: /var/lib/containers/storagegraphRootAllocated: 1081101176832graphRootUsed: 101926649856graphStatus:
Backing Filesystem: extfsNative Overlay Diff: "false"Supports d_type: "true"Supports shifting: "false"Supports volatile: "true"Using metacopy: "true"imageCopyTmpDir: /var/tmpimageStore:
number: 29runRoot: /run/containers/storagetransientStore: falsevolumePath: /var/lib/containers/storage/volumesversion:
APIVersion: 5.3.1Built: 1732147200BuiltTime: Thu Nov 21 09:00:00 2024GitCommit: ""GoVersion: go1.22.7Os: linuxOsArch: linux/amd64Version: 5.3.1
foriequal0
changed the title
Leading slash in container ignorefile doesn't match as expected
Leading slashes in container ignorefile don't match as expected
Mar 4, 2025
foriequal0
added a commit
to foriequal0/pod-graceful-drain
that referenced
this issue
Mar 4, 2025
Issue Description
I noticed that
podman build
on Windows takes a huge amount of time to prepare just the context.It turned out that my Containerignore file didn't work at all.
Huge git repository and build cache are included in the build context.
Removing leading slashes fixed the problem.
Steps to reproduce the issue
Steps to reproduce the issue
I had ignorefile like this
Describe the results you received
It takes a long time to prepare the context when the context is huge
Describe the results you expected
It shouldn't take a long time to prepare
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
Windows 11
Additional information
https://docs.docker.com/build/concepts/context/#syntax
leading and trailing slashes should be ignored as per Dockerignore spec
The text was updated successfully, but these errors were encountered: