From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Fiona Klute <fiona.klute@gmx.de>
Cc: Ricardo Martincoski <ricardo.martincoski@datacom.com.br>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] utils/docker-run: Allow running with Podman
Date: Fri, 31 May 2024 14:54:01 +0200 [thread overview]
Message-ID: <ZlnIaaG4tq48mtHV@landeda> (raw)
In-Reply-To: <20240531104425.2515591-1-fiona.klute@gmx.de>
Fiona, All,
On 2024-05-31 12:44 +0200, Fiona Klute via buildroot spake thusly:
> Podman is command line compatible with Docker, there's no need to
> require contributors to install Docker to run checks before sending
> patches.
>
> The additional "--userns=keep-id" option is necessary because unlike
> Docker Podman creates a user namespace for containers by
> default. Without keep-id the repository and pre-existing output files
> belong to root inside the container namespace, breaking writes,
> certain Git safety checks, and possibly all access (if the user is
> using a strict umask).
>
> Signed-off-by: Fiona Klute <fiona.klute+wiwa@gmx.de>
I have a hook that validates that the author has properly signed-off
their contribution, and your sub-addressing triggered the check. Damn, I
need to test for more corner-cases!
Applied to next, thanks.
Regards,
Yann E. MORIN.
> ---
> utils/docker-run | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/utils/docker-run b/utils/docker-run
> index 79694474c1..3dcabe2718 100755
> --- a/utils/docker-run
> +++ b/utils/docker-run
> @@ -29,6 +29,16 @@ declare -a mountpoints=(
> "$(pwd)"
> )
>
> +if command -v docker >/dev/null; then
> + DOCKER="docker"
> +elif command -v podman >/dev/null; then
> + DOCKER="podman"
> + docker_opts+=( --userns=keep-id )
> +else
> + echo "ERROR: Neither docker nor podman available!" >&2
> + exit 1
> +fi
> +
> # curl lists (and recognises and uses) other types of *_proxy variables,
> # but only those make sense for Buildroot:
> for env in all_proxy http_proxy https_proxy ftp_proxy no_proxy; do
> @@ -84,4 +94,4 @@ if tty -s; then
> docker_opts+=( -t )
> fi
>
> -exec docker run "${docker_opts[@]}" "${IMAGE}" "${@}"
> +exec ${DOCKER} run "${docker_opts[@]}" "${IMAGE}" "${@}"
> --
> 2.45.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2024-05-31 12:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-31 10:44 [Buildroot] [PATCH 1/1] utils/docker-run: Allow running with Podman Fiona Klute via buildroot
2024-05-31 12:54 ` Yann E. MORIN [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=ZlnIaaG4tq48mtHV@landeda \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=fiona.klute@gmx.de \
--cc=ricardo.martincoski@datacom.com.br \
/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.