Package: buildah
Severity: important
X-Debbugs-Cc: e...@sil.org

It looks like the version of buildah included in Debian (and Ubuntu) doesn't
support heredocs although this has been fixed for a while in upstream. It looks
like that patch got intentionally reverted in Debian.

This greatly reduces the compatibility with Docker as well as with Podman on
other systems.

To reproduce:

Create a `Dockerfile`:
```
FROM alpine
ARG FOO=bar
COPY <<-EOT /script.sh
  echo "hello ${FOO}"
EOT
ENTRYPOINT ash /script.sh
```

and build with `buildah build -f Dockerfile`. This fails with:

```
$ buildah build -f Dockerfile
STEP 1/6: FROM alpine
STEP 2/6: ARG FOO=bar
STEP 3/6: COPY <<-EOT /script.sh
Error: building at STEP "COPY <<-EOT /script.sh": checking on sources under
"/tmp": copier: stat: "/<<-EOT": no such file or directory
```

References:
- [1] https://docs.docker.com/reference/dockerfile/#here-documents
- [2] https://github.com/containers/buildah/issues/5474


-- System Information:
Debian Release: bookworm/sid
  APT prefers jammy-updates
  APT policy: (500, 'jammy-updates'), (500, 'jammy-security'), (500, 'jammy'), 
(100, 'jammy-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.0-35-generic (SMP w/20 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages buildah depends on:
pn  golang-github-containers-common  <none>
ii  libc6                            2.35-0ubuntu3.7
ii  libdevmapper1.02.1               2:1.02.175-2.1ubuntu4
ii  libglib2.0-0                     2.72.4-0ubuntu2.3
ii  libgpgme11                       1.16.0-1.2ubuntu4.2
ii  libostree-1-1                    2022.2-3
ii  libseccomp2                      2.5.3-2ubuntu2
ii  libselinux1                      3.3-1build2
pn  uidmap                           <none>

Versions of packages buildah recommends:
ii  containerd.io [runc]  1.6.32-1
pn  fuse-overlayfs        <none>

Versions of packages buildah suggests:
pn  containers-storage  <none>

Reply via email to