Re: issue about classes/image-oci.bbclass

"Yiding Liu (Fujitsu)" <[email protected]>
Newsgroups org.yoctoproject.lists.meta-virtualization
Message-ID <OS7PR01MB14444582F840F3D2807F132B39B47A@OS7PR01MB14444.jpnprd01.prod.outlook.com>
Hi Bruce

     Thanks for your answer.

Liu
________________________________
发件人: Bruce Ashfield <[email protected]>
发送时间: 2026年3月11日 11:17
收件人: Liu, Yiding/刘 乙丁 <[email protected]>
抄送: [email protected] <[email protected]>
主题: Re: issue about classes/image-oci.bbclass



On Tue, Mar 10, 2026 at 11:08 PM Yiding Liu (Fujitsu) <[email protected]<mailto:[email protected]>> wrote:
Hi Bruce
     I didn't mean to change the image-oci.bbclass but to fix the  recipes-extended/images/container-app-base.bb<http://container-app-base.bb>


The answer is the same. There's multiple stacks on top of that example that expect the current behaviour, so I prefer to leave it as-is,
but I can do some testing and see if anything breaks.

The container-app-base is intended to be extended for actual applications, those are just placeholders.

Bruce


     To make OCI_IMAGE_CMD as empty in container-app-base.bb<http://container-app-base.bb>, or it will have a wrong runtime result as following.
               $ podman run --rm f0d79291ef08
              date: invalid date '/bin/sh'

     Maybe a patch like this?
diff --git a/recipes-extended/images/container-app-base.bb<http://container-app-base.bb> b/recipes-extended/images/container-app-base.bb<http://container-app-base.bb>
index 34381ed2..4a1deac2 100644
--- a/recipes-extended/images/container-app-base.bb<http://container-app-base.bb>
+++ b/recipes-extended/images/container-app-base.bb<http://container-app-base.bb>
@@ -8,6 +8,7 @@ include container-base.bb<http://container-base.bb>
 # container. What we have below is a placholder. if you run this
 # container, you'll get the date echo'd
 CONTAINER_APP_CMD ?= "date"
+OCI_IMAGE_CMD = ""

     What do you think about it?

Liu

________________________________
发件人: Bruce Ashfield <[email protected]<mailto:[email protected]>>
发送时间: 2026年3月10日 20:28
收件人: Liu, Yiding/刘 乙丁 <[email protected]<mailto:[email protected]>>
抄送: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
主题: Re: issue about classes/image-oci.bbclass



On Tue, Mar 10, 2026 at 2:49 AM Yiding Liu (Fujitsu) <[email protected]<mailto:[email protected]>> wrote:
Hi Bruce
     I found an issue about OCI_IMAGE_CMD ?= "/bin/sh" when I use the container-app-base image.

    $ podman run --rm f0d79291ef08
     date: invalid date '/bin/sh'

    The issue was caused by the Entrypoint and Cmd are both defined, and cmd will be the append args of date,
    Which caused the output error.

   $ podman inspect f0d79291ef08
      ...
          "Config": {
               "Entrypoint": [
                    "date"
               ],
               "Cmd": [
                    "/bin/sh"
               ],
    ...

   I think make OCI_IMAGE_CMD as empty can solve this issue, what do you think about it?
   OCI_IMAGE_CMD ?= ""

Nope. You can override that yourself.

The current defaults have been extensively tested and modified just recently to make the entrypoint work in more scenarios.

Check git history for all the details.

Bruce



   $ podman run --rm 70306dacdc4a
   Tue Mar 10 06:27:42 UTC 2026

Liu



--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II



--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.