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
Not quite sure if this is a bug or a design decision.
If you have a Containerfile which looks like:
FROM scratch
COPY ./hello* /
Produces:
❯ podman build -f Containerfile .
STEP 1/2: FROM scratch
STEP 2/2: COPY ./hello* /
Error: building at STEP "COPY ./hello* /": checking on sources under "/var/tmp/libpod_builder283865622/build": Rel: can't make relative to /var/tmp/libpod_builder283865622/build; copier: stat: ["/hello*"]: no such file or directory
If you do not have any files present which match that glob pattern, the build fails.
In Docker, if no files match, build still continues and it doesn't copy anything into the image.
Steps to reproduce the issue
See above
Describe the results you received
See above
Describe the results you expected
I would like to have the same behaviour as Docker.
This functionality is useful for when a file may or may not exist, such as the go.sum file. It doesn't exist when you have no external deps, but as soon as you do, you'll want it included in your build.
podman info output
❯ podman infohost:
arch: amd64buildahVersion: 1.38.0-devcgroupControllers:
- cpuset
- cpu
- io
- memory
- hugetlb
- pids
- rdma
- misccgroupManager: systemdcgroupVersion: v2conmon:
package: conmon-2.1.12-2.fc40.x86_64path: /usr/bin/conmonversion: 'conmon version 2.1.12, commit: 'cpuUtilization:
idlePercent: 98.39systemPercent: 1userPercent: 0.61cpus: 8databaseBackend: sqlitedistribution:
distribution: fedoravariant: coreosversion: "40"eventLogger: journaldfreeLocks: 2048hostname: localhost.localdomainidMappings:
gidmap: nulluidmap: nullkernel: 6.11.3-200.fc40.x86_64linkmode: dynamiclogDriver: journaldmemFree: 3355230208memTotal: 3802005504networkBackend: netavarknetworkBackendInfo:
backend: netavarkdns:
package: aardvark-dns-1.13.0-1.20241111172239111586.main.21.g63289a6.fc40.x86_64path: /usr/libexec/podman/aardvark-dnsversion: aardvark-dns 1.14.0-devpackage: netavark-1.13.0-1.20241108145912121588.main.16.g2b0e652.fc40.x86_64path: /usr/libexec/podman/netavarkversion: netavark 1.14.0-devociRuntime:
name: crunpackage: crun-1.18.1-1.20241031162054462920.main.4.g01830cb.fc40.x86_64path: /usr/bin/crunversion: |- crun version UNKNOWN commit: 06b0b9e87e71e3dd18a94fcfa2b37fdfcb2d5078 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^20240906.g6b38f07-1.fc40.x86_64version: | pasta 0^20240906.g6b38f07-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: trueserviceIsRemote: trueslirp4netns:
executable: /usr/bin/slirp4netnspackage: slirp4netns-1.2.2-2.fc40.x86_64version: |- slirp4netns version 1.2.2 commit: 0ee2d87523e906518d34a6b423271e4826f71faf libslirp: 4.7.0 SLIRP_CONFIG_VERSION_MAX: 4 libseccomp: 2.5.5swapFree: 0swapTotal: 0uptime: 0h 2m 11.00svariant: ""plugins:
authorization: nulllog:
- k8s-file
- none
- passthrough
- journaldnetwork:
- bridge
- macvlan
- ipvlanvolume:
- localregistries:
search:
- docker.iostore:
configFile: /usr/share/containers/storage.confcontainerStore:
number: 0paused: 0running: 0stopped: 0graphDriverName: overlaygraphOptions:
overlay.imagestore: /usr/lib/containers/storageoverlay.mountopt: nodev,metacopy=ongraphRoot: /var/lib/containers/storagegraphRootAllocated: 99252940800graphRootUsed: 7316963328graphStatus:
Backing Filesystem: xfsNative Overlay Diff: "false"Supports d_type: "true"Supports shifting: "true"Supports volatile: "true"Using metacopy: "true"imageCopyTmpDir: /var/tmpimageStore:
number: 2runRoot: /run/containers/storagetransientStore: falsevolumePath: /var/lib/containers/storage/volumesversion:
APIVersion: 5.3.0-dev-da8995658Built: 1731369600BuiltTime: Tue Nov 12 00:00:00 2024GitCommit: ""GoVersion: go1.22.7Os: linuxOsArch: linux/amd64Version: 5.3.0-dev-da8995658
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
No response
Additional information
Targeting more than one file during the COPY does work, and the build is successful.
# ./world exists
# ./hello* does not exist
FROM scratch
COPY ./world ./hello* /
The text was updated successfully, but these errors were encountered:
Issue Description
Not quite sure if this is a bug or a design decision.
If you have a Containerfile which looks like:
Produces:
If you do not have any files present which match that glob pattern, the build fails.
In Docker, if no files match, build still continues and it doesn't copy anything into the image.
Steps to reproduce the issue
See above
Describe the results you received
See above
Describe the results you expected
I would like to have the same behaviour as Docker.
This functionality is useful for when a file may or may not exist, such as the go.sum file. It doesn't exist when you have no external deps, but as soon as you do, you'll want it included in your build.
podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
No response
Additional information
Targeting more than one file during the COPY does work, and the build is successful.
The text was updated successfully, but these errors were encountered: