diff mbox series

[for-4.19,2/4] CI: Adjust the usage of inline files

Message ID 20240703142002.1662874-3-andrew.cooper3@citrix.com (mailing list archive)
State New
Headers show
Series CI: Fixes, part 1 | expand

Commit Message

Andrew Cooper July 3, 2024, 2:20 p.m. UTC
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(-)

Comments

Roger Pau Monné July 3, 2024, 2:37 p.m. UTC | #1
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.
diff mbox series

Patch

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