From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
Anthony PERARD <anthony.perard@vates.tech>,
Stefano Stabellini <sstabellini@kernel.org>,
Doug Goldstein <cardoe@cardoe.com>,
Oleksii Kurochko <oleksii.kurochko@gmail.com>
Subject: Re: [PATCH for-4.19 1/4] CI: Formalise the use of heredocs
Date: Wed, 3 Jul 2024 16:34:04 +0200 [thread overview]
Message-ID: <ZoVhXGF7sknROnS0@macbook.local> (raw)
In-Reply-To: <20240703142002.1662874-2-andrew.cooper3@citrix.com>
On Wed, Jul 03, 2024 at 03:19:59PM +0100, Andrew Cooper wrote:
> Commit b5739330d7f4 introduced the use of heredocs in the jessie/stretch
> dockerfiles.
>
> It turns out this was introduced by BuildKit in 2018 along with a
> standardisation of Dockerfile syntax, and has subsequently been adopted by the
> docker community.
>
> Annotate all dockerfiles with a statement of the syntax in use, and extend
> README.md details including how to activate BuildKit when it's available but
> off by default.
>
> This allows the containers to be rebuilt following commit a0e29b316363 ("CI:
> Drop glibc-i386 from the build containers").
>
> Fixes: b5739330d7f4 ("automation: fix jessie/stretch images to use archive.debian.org apt repos")
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@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/README.md | 10 +++++++++-
> automation/build/alpine/3.18-arm64v8.dockerfile | 1 +
> automation/build/alpine/3.18.dockerfile | 1 +
> automation/build/archlinux/current-riscv64.dockerfile | 1 +
> automation/build/archlinux/current.dockerfile | 1 +
> automation/build/centos/7.dockerfile | 1 +
> .../build/debian/bookworm-arm64v8-arm32-gcc.dockerfile | 1 +
> automation/build/debian/bookworm-arm64v8.dockerfile | 1 +
> automation/build/debian/bookworm-cppcheck.dockerfile | 1 +
> automation/build/debian/bookworm-i386.dockerfile | 1 +
> automation/build/debian/bookworm.dockerfile | 1 +
> automation/build/debian/bullseye-ppc64le.dockerfile | 1 +
> automation/build/debian/buster-gcc-ibt.dockerfile | 1 +
> automation/build/debian/jessie-i386.dockerfile | 1 +
> automation/build/debian/jessie.dockerfile | 1 +
> automation/build/debian/stretch-i386.dockerfile | 1 +
> automation/build/debian/stretch.dockerfile | 1 +
> automation/build/fedora/29.dockerfile | 1 +
> automation/build/suse/opensuse-leap.dockerfile | 1 +
> automation/build/suse/opensuse-tumbleweed.dockerfile | 1 +
> automation/build/ubuntu/bionic.dockerfile | 1 +
> automation/build/ubuntu/focal.dockerfile | 1 +
> automation/build/ubuntu/trusty.dockerfile | 1 +
> automation/build/ubuntu/xenial-xilinx.dockerfile | 1 +
> automation/build/ubuntu/xenial.dockerfile | 1 +
> automation/build/yocto/yocto.dockerfile.in | 2 ++
> .../tests-artifacts/alpine/3.18-arm64v8.dockerfile | 1 +
> automation/tests-artifacts/alpine/3.18.dockerfile | 1 +
> .../tests-artifacts/kernel/5.19-arm64v8.dockerfile | 1 +
> automation/tests-artifacts/kernel/6.1.19.dockerfile | 1 +
> .../qemu-system-aarch64/6.0.0-arm64v8.dockerfile | 1 +
> .../qemu-system-ppc64/8.1.0-ppc64.dockerfile | 1 +
> 32 files changed, 41 insertions(+), 1 deletion(-)
>
> diff --git a/automation/build/README.md b/automation/build/README.md
> index 1c040533fdd8..12a2b4af1807 100644
> --- a/automation/build/README.md
> +++ b/automation/build/README.md
> @@ -81,7 +81,14 @@ Building a container
>
> There is a makefile to make this process easier. You should be
> able to run `make DISTRO/VERSION` to have Docker build the container
> -for you. If you define the `PUSH` environment variable when running the
> +for you.
> +
> +Xen's dockerfiles use heredocs, which depend on the standardised dockerfile
> +syntax introduced by [BuiltKit]. This should work by default starting with
> +docker 23.0, or podman/buildah v1.33. For older versions of docker, it can be
> +activated with `DOCKER_BUILDKIT=1` in the environment.
> +
> +If you define the `PUSH` environment variable when running the
> former `make` command, it will push the container to the [registry] if
> you have access to do so and have your Docker logged into the registry.
>
> @@ -101,6 +108,7 @@ env CONTAINER_NO_PULL=1 \
> make -C automation/build suse/opensuse-tumbleweed PUSH=1
> ```
>
> +[BuildKit]: https://docs.docker.com/build/buildkit/
> [registry]: https://gitlab.com/xen-project/xen/container_registry
> [registry help]: https://gitlab.com/help/user/project/container_registry
>
> diff --git a/automation/build/alpine/3.18-arm64v8.dockerfile b/automation/build/alpine/3.18-arm64v8.dockerfile
> index 91e90220240f..19fe46f8418f 100644
> --- a/automation/build/alpine/3.18-arm64v8.dockerfile
> +++ b/automation/build/alpine/3.18-arm64v8.dockerfile
> @@ -1,3 +1,4 @@
> +# syntax=docker/dockerfile:1
Will this fail to parse if not using BuildKit?
Thanks, Roger.
next prev parent reply other threads:[~2024-07-03 14:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-03 14:19 [PATCH for-4.19 0/4] CI: Fixes, part 1 Andrew Cooper
2024-07-03 14:19 ` [PATCH for-4.19 1/4] CI: Formalise the use of heredocs Andrew Cooper
2024-07-03 14:34 ` Roger Pau Monné [this message]
2024-07-03 14:38 ` Andrew Cooper
2024-07-03 14:20 ` [PATCH for-4.19 2/4] CI: Adjust the usage of inline files Andrew Cooper
2024-07-03 14:37 ` Roger Pau Monné
2024-07-03 14:20 ` [PATCH for-4.19 3/4] CI: Drop bin86/dev86 from archlinux container Andrew Cooper
2024-07-03 14:43 ` Roger Pau Monné
2024-07-03 14:52 ` Andrew Cooper
2024-07-03 16:19 ` Anthony PERARD
2024-07-04 18:06 ` Andrew Cooper
2024-07-03 14:20 ` [PATCH for-4.19 4/4] CI: Rework the CentOS7 container Andrew Cooper
2024-07-03 14:55 ` Roger Pau Monné
2024-07-03 15:09 ` Andrew Cooper
2024-07-04 8:15 ` Roger Pau Monné
2024-07-04 18:59 ` Andrew Cooper
2024-07-04 11:46 ` Oleksii
2024-07-04 18:58 ` [PATCH for-4.19 v2 " Andrew Cooper
2024-07-04 10:37 ` [PATCH for-4.19 0/4] CI: Fixes, part 1 Oleksii
2024-07-04 10:51 ` Andrew Cooper
2024-07-04 11:13 ` Oleksii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZoVhXGF7sknROnS0@macbook.local \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=cardoe@cardoe.com \
--cc=oleksii.kurochko@gmail.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.