All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fiona Klute 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>
Subject: Re: [Buildroot] [PATCH] utils/docker-run: allow explicitly setting of docker/podman/...
Date: Mon, 17 Feb 2025 13:13:20 +0100	[thread overview]
Message-ID: <e429c293-485e-45fa-9df9-e768df93c32b@gmx.de> (raw)
In-Reply-To: <20250216170350.397879-1-yann.morin.1998@free.fr>

Am 16.02.25 um 18:03 schrieb Yann E. MORIN:
> 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>

Makes sense to me.

Reviewed-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>

Best regards,
Fiona

> ---
>   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

  reply	other threads:[~2025-02-17 12:13 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 [this message]
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

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=e429c293-485e-45fa-9df9-e768df93c32b@gmx.de \
    --to=buildroot@buildroot.org \
    --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 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.