All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: Arnout Vandecappelle <arnout@mind.be>
Cc: yann.morin@orange.com, Sergio Prado <sergio.prado@e-labworks.com>,
	Matthew Weber <matthew.weber@collins.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] fs/oci: entrypoint and command are space-separated lists
Date: Fri, 13 May 2022 22:54:38 +0200	[thread overview]
Message-ID: <87fsld886p.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <d31498c0-ae87-12ed-eae6-6efbd37bcca2@mind.be> (Arnout Vandecappelle's message of "Fri, 13 May 2022 21:42:00 +0200")

>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

Hi,

 >> >  If you really need spaces, you can still use $(space). So,
 >> after
 >> >  adding single quotes, the following should work:
 >> > BR2_TARGET_ROOTFS_OCI_ENTRYPOINT_ARGS="date;$(space)date"
 >> Nice and easy for newcomers :P

 >  Sure, but do you have an actual use case where you want spaces in the
 >  CMD or ENTRYPOINT? Note that even in the Dockerfile itself you need
 > to switch to JSON syntax to support that case. I think it's
 > exceedingly rare.

Sorry, what do you mean? If I have a silly container like:

FROM busybox

CMD for i in 1 2 3; do date; done

Then that works fine (as CMD expands to sh -c "<args>" if you don't use
the array format).

docker inspect <container> | jq '.[] | .Config.Cmd'
[
  "/bin/sh",
  "-c",
  "for i in 1 2 3; do date; done"
]


I don't think I have ever seen embedded spaces in ENTRYPOINT (but I have
seen multiple arguments), but in CMD I have.


 >  If you really have such complicated cases, you're probably better off
 >  doing it with a post-image script that imports the tarball after
 > all. But the simple case that covers 95% of the use cases can be
 > covered by fs/oci.

I would argue that just doing docker (or podman) import in the
post-image script is easier than fs/oci as people doing container stuff
are likely to already know docker and Dockerfiles, but oh well.


 >> >  That requires a docker daemon installed on the host, while
 >> >  sloci-image can be run as normal user without any host support
 >> > required.
 >> s/docker import/podman import/.

 >  So it requires a podman daemon installed on the host... podman can do
 >  rootless containers, but it's still mediated by the daemon.

No, podman is daemon-less.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      reply	other threads:[~2022-05-13 20:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 12:34 [Buildroot] [PATCH] fs/oci: entrypoint and command are space-separated lists yann.morin
2022-05-12 15:34 ` Peter Korsgaard
2022-05-12 22:31   ` Arnout Vandecappelle
2022-05-13  6:06     ` Peter Korsgaard
2022-05-13 19:42       ` Arnout Vandecappelle
2022-05-13 20:54         ` Peter Korsgaard [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=87fsld886p.fsf@dell.be.48ers.dk \
    --to=peter@korsgaard.com \
    --cc=arnout@mind.be \
    --cc=buildroot@buildroot.org \
    --cc=matthew.weber@collins.com \
    --cc=sergio.prado@e-labworks.com \
    --cc=yann.morin@orange.com \
    /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.