As per:
https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/reference.md#here-documents
For inline files, use COPY with a heredoc, rather than opencoding it through
/bin/sh.
No practical change.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Anthony PERARD <anthony.perard@vates.tech>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Doug Goldstein <cardoe@cardoe.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
automation/build/debian/jessie-i386.dockerfile | 2 +-
automation/build/debian/jessie.dockerfile | 2 +-
automation/build/debian/stretch-i386.dockerfile | 2 +-
automation/build/debian/stretch.dockerfile | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/automation/build/debian/jessie-i386.dockerfile b/automation/build/debian/jessie-i386.dockerfile
index f6eaa94ee523..1eb7ff11c7d3 100644
--- a/automation/build/debian/jessie-i386.dockerfile
+++ b/automation/build/debian/jessie-i386.dockerfile
@@ -12,7 +12,7 @@ WORKDIR /build
ENTRYPOINT ["linux32"]
# replace repos in archive as release is EOL
-RUN cat <<"END" > /etc/apt/sources.list
+COPY <<"END" /etc/apt/sources.list
deb http://archive.debian.org/debian/ jessie main contrib non-free
deb http://archive.debian.org/debian/ jessie-backports main contrib non-free
deb http://archive.debian.org/debian-security/ jessie/updates main contrib non-free
diff --git a/automation/build/debian/jessie.dockerfile b/automation/build/debian/jessie.dockerfile
index a870e743fcaf..4c0ffe66f8fe 100644
--- a/automation/build/debian/jessie.dockerfile
+++ b/automation/build/debian/jessie.dockerfile
@@ -10,7 +10,7 @@ RUN mkdir /build
WORKDIR /build
# replace repos in archive as release is EOL
-RUN cat <<"END" > /etc/apt/sources.list
+COPY <<"END" /etc/apt/sources.list
deb http://archive.debian.org/debian/ jessie main contrib non-free
deb http://archive.debian.org/debian/ jessie-backports main contrib non-free
deb http://archive.debian.org/debian-security/ jessie/updates main contrib non-free
diff --git a/automation/build/debian/stretch-i386.dockerfile b/automation/build/debian/stretch-i386.dockerfile
index ad8db692aaf2..8ec9c3a24667 100644
--- a/automation/build/debian/stretch-i386.dockerfile
+++ b/automation/build/debian/stretch-i386.dockerfile
@@ -12,7 +12,7 @@ WORKDIR /build
ENTRYPOINT ["linux32"]
# replace repos in archive as release is EOL
-RUN cat <<"END" > /etc/apt/sources.list
+COPY <<"END" /etc/apt/sources.list
deb http://archive.debian.org/debian/ stretch main contrib non-free
deb http://archive.debian.org/debian/ stretch-backports main contrib non-free
deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
diff --git a/automation/build/debian/stretch.dockerfile b/automation/build/debian/stretch.dockerfile
index 4dfd40b54277..2db4552662de 100644
--- a/automation/build/debian/stretch.dockerfile
+++ b/automation/build/debian/stretch.dockerfile
@@ -10,7 +10,7 @@ RUN mkdir /build
WORKDIR /build
# replace repos in archive as release is EOL
-RUN cat <<"END" > /etc/apt/sources.list
+COPY <<"END" /etc/apt/sources.list
deb http://archive.debian.org/debian/ stretch main contrib non-free
deb http://archive.debian.org/debian/ stretch-backports main contrib non-free
deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
--
2.39.2
On Wed, Jul 03, 2024 at 03:20:00PM +0100, Andrew Cooper wrote: > As per: > > https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/reference.md#here-documents > > For inline files, use COPY with a heredoc, rather than opencoding it through > /bin/sh. > > No practical change. > > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com> Thanks, Roger.
© 2016 - 2024 Red Hat, Inc.