Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle via buildroot <buildroot@buildroot.org>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>, buildroot@buildroot.org
Cc: Ricardo Martincoski <ricardo.martincoski@datacom.com.br>,
	Julien Olivain <ju.o@free.fr>, Fiona Klute <fiona.klute@gmx.de>
Subject: Re: [Buildroot] [PATCH] utils/docker-run: allow explicitly setting of docker/podman/...
Date: Tue, 18 Feb 2025 21:23:25 +0100	[thread overview]
Message-ID: <17855b40-bee0-483b-b8ea-e346a7401f9f@mind.be> (raw)
In-Reply-To: <20250216170350.397879-1-yann.morin.1998@free.fr>



On 16/02/2025 18:03, Yann E. MORIN wrote:
> Currently, our docker-run helper will decide on its own whether it
> should use docker (preferred) or podman (fallback). s introduced in
> 9a629f5129d6 (utils/docker-run: allow running with Podman). In case
> both are installed, it is not possible to exercise the podman case.
> 
> Allow the user to force the one to use, by setting the BR2_DOCKER
> environment variable. If that is set and does not exist, exit with
> an explicit error message (rather than rely on the failure when
> eventually exec-ing the specified command).
> 
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Ricardo Martincoski <ricardo.martincoski@datacom.com.br>
> Cc: Julien Olivain <ju.o@free.fr>
> Cc: Fiona Klute <fiona.klute@gmx.de>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   utils/docker-run | 9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/utils/docker-run b/utils/docker-run
> index 849df66d54..27c169db72 100755
> --- a/utils/docker-run
> +++ b/utils/docker-run
> @@ -35,7 +35,14 @@ declare -a mountpoints=(
>   # compatibility command.
>   export PODMAN_USERNS="keep-id"
>   
> -if command -v docker >/dev/null; then
> +if [ "${BR2_DOCKER}" ]; then
> +    if command -v "${BR2_DOCKER}" >/dev/null; then
> +        DOCKER="${BR2_DOCKER}"
> +    else
> +        printf 'ERROR: Command "%s" (from env BR2_DOCKER) not found.\n' "${BR2_DOCKER}" >&2
> +        exit 1
> +    fi
> +elif command -v docker >/dev/null; then
>       DOCKER="docker"
>   elif command -v podman >/dev/null; then
>       DOCKER="podman"

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      parent reply	other threads:[~2025-02-18 20:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-16 17:03 [Buildroot] [PATCH] utils/docker-run: allow explicitly setting of docker/podman/ Yann E. MORIN
2025-02-17 12:13 ` Fiona Klute via buildroot
2025-02-17 20:54 ` Arnout Vandecappelle via buildroot
2025-02-17 21:53   ` Yann E. MORIN
2025-02-17 22:05     ` Arnout Vandecappelle via buildroot
2025-02-18  8:00       ` Yann E. MORIN
2025-02-18 20:23 ` Arnout Vandecappelle via buildroot [this message]

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=17855b40-bee0-483b-b8ea-e346a7401f9f@mind.be \
    --to=buildroot@buildroot.org \
    --cc=arnout@mind.be \
    --cc=fiona.klute@gmx.de \
    --cc=ju.o@free.fr \
    --cc=ricardo.martincoski@datacom.com.br \
    --cc=yann.morin.1998@free.fr \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox