All of lore.kernel.org
 help / color / mirror / Atom feed
* query on container demo
@ 2023-02-09 19:02 SIMON BABY
  2023-02-10 14:29 ` [meta-virtualization] " Bruce Ashfield
  0 siblings, 1 reply; 6+ messages in thread
From: SIMON BABY @ 2023-02-09 19:02 UTC (permalink / raw)
  To: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 1756 bytes --]

I was testing the meta-virtualization/recipes-demo/images/ app-container. I
was able to build the container. But I am not sure where the image is
created  and how we run the image using docker commands. I also see the
.yaml files. Can you please help?

On the target I can see /usr/bin/flask-app.



bitbake app-container


The generated build foles are below.



build/tmp/work/armv8a-poky-linux/helloworld-flask$ ls

0.1-r0

/build/tmp/work/armv8a-poky-linux/helloworld-flask$ cd 0.1-r0/

build/tmp/work/armv8a-poky-linux/helloworld-flask/0.1-r0$ ls -ll

total 84

-rw-r--r--  1 tdydev tdydev    65 Feb  7 11:58 configure.sstate

drwxr-xr-x  3 tdydev tdydev  4096 Feb  7 12:10 deploy-debs

drwxr-xr-x  2 tdydev tdydev  4096 Feb  7 11:38 deploy-source-date-epoch

-rwxrwxr-x  1 tdydev tdydev   518 Feb  2 14:24 flask-app

-rw-r--r--  1 tdydev tdydev   511 Feb  7 11:58 flask-app-service.yaml

-rw-r--r--  1 tdydev tdydev   178 Feb  7 11:58 flask-app.yaml

drwxr-xr-x  2 tdydev tdydev  4096 Feb  7 11:35 helloworld-flask-0.1

drwxr-xr-x  4 tdydev tdydev  4096 Feb  7 11:58 image

drwxr-xr-x  3 tdydev tdydev  4096 Feb  7 11:38 license-destdir

drwxr-xr-x  4 tdydev tdydev  4096 Apr  5  2011 package

drwxr-xr-x 10 tdydev tdydev  4096 Feb  7 12:10 packages-split

drwxr-xr-x  7 tdydev tdydev  4096 Apr  5  2011 pkgdata

drwxr-xr-x  7 tdydev tdydev  4096 Feb  7 11:58 pkgdata-pdata-input

drwxr-xr-x  7 tdydev tdydev  4096 Feb  7 11:58 pkgdata-sysroot

drwxrwxr-x  2 tdydev tdydev  4096 Feb  7 12:10 pseudo

drwxr-xr-x  5 tdydev tdydev  4096 Feb  7 12:10 recipe-sysroot

drwxr-xr-x  8 tdydev tdydev  4096 Feb  7 12:10 recipe-sysroot-native

drwxr-xr-x  2 tdydev tdydev  4096 Feb  7 11:35 source-date-epoch

drwxr-xr-x  2 tdydev tdydev 12288


Regards

Simon

[-- Attachment #2: Type: text/html, Size: 5245 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-virtualization] query on container demo
  2023-02-09 19:02 query on container demo SIMON BABY
@ 2023-02-10 14:29 ` Bruce Ashfield
  2023-02-14  0:51   ` SIMON BABY
  0 siblings, 1 reply; 6+ messages in thread
From: Bruce Ashfield @ 2023-02-10 14:29 UTC (permalink / raw)
  To: SIMON BABY; +Cc: meta-virtualization

On Thu, Feb 9, 2023 at 2:02 PM SIMON BABY <simonkbaby@gmail.com> wrote:
>
> I was testing the meta-virtualization/recipes-demo/images/ app-container. I was able to build the container. But I am not sure where the image is created  and how we run the image using docker commands. I also see the .yaml files. Can you please help?
>

Those application containers are in the oci-image format. The yaml
files are sample kubernetes deploy instructions, so unless you are
using kubernetes, they won't be of any help.

As for the OCI image files, how you get them onto the target is image
and distro specific.

As of right now, we don't fully support (I have some work in progress
code that I expect to get into the tree for the upcoming release)
cross loading of containers. Mainly due to the need for root
permissions on the build host, and other issues with namespaces,
users, etc.

Some common ways to use the OCI images are by copying them to a
registry via skopeo (or whatever tool you want), or you can arrange to
have the containers installed into the image (via mulitconfig, or
rootfs post processing), and load them via podman/docker/etc, on the
first boot.

There are LOTS of different ways that you'll see the containers being
manipulated, most of them are very specific to the requirements of a
distro, or use some sort of workarounds to permissions issues.

Again, I'm trying to introduce a supported / standard way to cross
load our OCI generated containers, but that won't be ready for a bit
yet.

Bruce

> On the target I can see /usr/bin/flask-app.
>
>
>
> bitbake app-container
>
>
> The generated build foles are below.
>
>
>
> build/tmp/work/armv8a-poky-linux/helloworld-flask$ ls
>
> 0.1-r0
>
> /build/tmp/work/armv8a-poky-linux/helloworld-flask$ cd 0.1-r0/
>
> build/tmp/work/armv8a-poky-linux/helloworld-flask/0.1-r0$ ls -ll
>
> total 84
>
> -rw-r--r--  1 tdydev tdydev    65 Feb  7 11:58 configure.sstate
>
> drwxr-xr-x  3 tdydev tdydev  4096 Feb  7 12:10 deploy-debs
>
> drwxr-xr-x  2 tdydev tdydev  4096 Feb  7 11:38 deploy-source-date-epoch
>
> -rwxrwxr-x  1 tdydev tdydev   518 Feb  2 14:24 flask-app
>
> -rw-r--r--  1 tdydev tdydev   511 Feb  7 11:58 flask-app-service.yaml
>
> -rw-r--r--  1 tdydev tdydev   178 Feb  7 11:58 flask-app.yaml
>
> drwxr-xr-x  2 tdydev tdydev  4096 Feb  7 11:35 helloworld-flask-0.1
>
> drwxr-xr-x  4 tdydev tdydev  4096 Feb  7 11:58 image
>
> drwxr-xr-x  3 tdydev tdydev  4096 Feb  7 11:38 license-destdir
>
> drwxr-xr-x  4 tdydev tdydev  4096 Apr  5  2011 package
>
> drwxr-xr-x 10 tdydev tdydev  4096 Feb  7 12:10 packages-split
>
> drwxr-xr-x  7 tdydev tdydev  4096 Apr  5  2011 pkgdata
>
> drwxr-xr-x  7 tdydev tdydev  4096 Feb  7 11:58 pkgdata-pdata-input
>
> drwxr-xr-x  7 tdydev tdydev  4096 Feb  7 11:58 pkgdata-sysroot
>
> drwxrwxr-x  2 tdydev tdydev  4096 Feb  7 12:10 pseudo
>
> drwxr-xr-x  5 tdydev tdydev  4096 Feb  7 12:10 recipe-sysroot
>
> drwxr-xr-x  8 tdydev tdydev  4096 Feb  7 12:10 recipe-sysroot-native
>
> drwxr-xr-x  2 tdydev tdydev  4096 Feb  7 11:35 source-date-epoch
>
> drwxr-xr-x  2 tdydev tdydev 12288
>
>
> Regards
>
> Simon
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#7849): https://lists.yoctoproject.org/g/meta-virtualization/message/7849
> Mute This Topic: https://lists.yoctoproject.org/mt/96860300/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: query on container demo
  2023-02-10 14:29 ` [meta-virtualization] " Bruce Ashfield
@ 2023-02-14  0:51   ` SIMON BABY
  2023-02-15 18:08     ` SIMON BABY
  0 siblings, 1 reply; 6+ messages in thread
From: SIMON BABY @ 2023-02-14  0:51 UTC (permalink / raw)
  To: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 2438 bytes --]

Hi bruce,
I was able to build the container image in .tar.bz2 format and able to download into the target as part of root file system. When I tried to  run the image on the target, am getting the bloew error. I used docker import command to get the image from .tar.bz2 file. Below is the error. Is this something related wth permission issue?

[  790.575751] docker0: port 1(veth092c057) entered blocking state

[  790.575813] docker0: port 1(veth092c057) entered disabled state

[  790.576071] device veth092c057 entered promiscuous mode

[  790.576258] audit: type=1700 audit(1676334388.308:51): dev=veth092c057 prom=256 old_prom=0 auid=4294967295 uid=0 gid=0 ses=4294967295

[  790.578895] audit: type=1300 audit(1676334388.308:51): arch=c00000b7 syscall=206 success=yes exit=40 a0=e a1=40004cdef0 a2=28 a3=0 items=0 ppid=1 pid=435 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="dockerd" exe="/usr/bin/dockerd" key=(null)

[  790.579931] audit: type=1327 audit(1676334388.308:51): proctitle=2F7573722F62696E2F646F636B657264002D480066643A2F2F

[  790.818439] docker0: port 1(veth092c057) entered disabled state

[  790.850282] device veth092c057 left promiscuous mode

[  790.850331] docker0: port 1(veth092c057) entered disabled state

[  790.850350] audit: type=1700 audit(1676334388.544:52): dev=veth092c057 prom=0 old_prom=256 auid=4294967295 uid=0 gid=0 ses=4294967295

[  790.881294] audit: type=1300 audit(1676334388.544:52): arch=c00000b7 syscall=206 success=yes exit=32 a0=e a1=400014da20 a2=20 a3=0 items=0 ppid=1 pid=435 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="dockerd" exe="/usr/bin/dockerd" key=(null)

[  790.881312] audit: type=1327 audit(1676334388.544:52): proctitle=2F7573722F62696E2F646F636B657264002D480066643A2F2F

*docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: can't get final child's PID from pipe: EOF: unknown.*

ERRO[0000] error waiting for container: context canceled

I notice that when I run docker load command, i got the below error. But docker import command was success.

docker load < /usr/bin/container-test-imx8mpevk.tar.bz2

open /var/lib/docker/tmp/docker-import-1198093330/etc/json: no such file or directory

Regards
Simon

[-- Attachment #2: Type: text/html, Size: 3433 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: query on container demo
  2023-02-14  0:51   ` SIMON BABY
@ 2023-02-15 18:08     ` SIMON BABY
  2023-02-17 14:14       ` [meta-virtualization] " Bruce Ashfield
  0 siblings, 1 reply; 6+ messages in thread
From: SIMON BABY @ 2023-02-15 18:08 UTC (permalink / raw)
  To: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 750 bytes --]

On Mon, Feb 13, 2023 at 04:51 PM, SIMON BABY wrote:

> 
> 
> 
> *docker: Error response from daemon: failed to create shim task: OCI
> runtime create failed: runc create failed: unable to start container
> process: can't get final child's PID from pipe: EOF: unknown.*
> 
> 
> 
> ERRO[0000] error waiting for container: context canceled
> 
> 

Hello team,
May i know the reason for the below error while trying to run the oci image from docker command.

docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: can't get final child's PID from pipe: EOF: unknown.

ERRO[0000] error waiting for container: context canceled

Regards
Simon

[-- Attachment #2: Type: text/html, Size: 1102 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-virtualization] query on container demo
  2023-02-15 18:08     ` SIMON BABY
@ 2023-02-17 14:14       ` Bruce Ashfield
  2023-02-17 15:29         ` SIMON BABY
  0 siblings, 1 reply; 6+ messages in thread
From: Bruce Ashfield @ 2023-02-17 14:14 UTC (permalink / raw)
  To: SIMON BABY; +Cc: meta-virtualization

I'd suggest trying something we know is better tested before trying to
load and run the OCI images directly.

That error message normally means something is missing in your target
image, a kernel configuration, or a support utility that docker
requires.

What is your MACHINE configuration ? I assume you are using master ?
or is this an older release ?

Can you try a simpler docker pull, docker run, test to confirm that
official registry images work ?

Bruce

On Wed, Feb 15, 2023 at 1:08 PM SIMON BABY <simonkbaby@gmail.com> wrote:
>
> On Mon, Feb 13, 2023 at 04:51 PM, SIMON BABY wrote:
>
> docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: can't get final child's PID from pipe: EOF: unknown.
>
> ERRO[0000] error waiting for container: context canceled
>
> Hello team,
>  May i know the reason for the below error while trying to run the oci image from docker command.
>
> docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: can't get final child's PID from pipe: EOF: unknown.
>
> ERRO[0000] error waiting for container: context canceled
>
> Regards
> Simon
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#7855): https://lists.yoctoproject.org/g/meta-virtualization/message/7855
> Mute This Topic: https://lists.yoctoproject.org/mt/96860300/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-virtualization] query on container demo
  2023-02-17 14:14       ` [meta-virtualization] " Bruce Ashfield
@ 2023-02-17 15:29         ` SIMON BABY
  0 siblings, 0 replies; 6+ messages in thread
From: SIMON BABY @ 2023-02-17 15:29 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 2986 bytes --]

Hello Bruce,

Thank you so much.The target I am using is NXP IMX8 (MACHINE=imx8mpevk
DISTRO=fsl-imx-wayland)
docker pull, docker run from docker hub is working fine.
Also if I generate the image with Dockerfile, docker save and then doker
run on the target, it works fine.
The issue I am getting is when I try with IMAGE_FSTYPES = "container".
Below is my bitbake recipe. Please let me know if I am missing anything.



DESCRIPTION = "Demo container application"
HOMEPAGE = "https://yoctoproject.org"
LICENSE = "CLOSED"

do_fetch[deptask] = "do_image_complete"
PACKAGE_INSTALL += "apptest"

IMAGE_FSTYPES = "container oci"
inherit image
inherit image-oci

CONTAINER_SHELL ?= "${@bb.utils.contains('PACKAGE_EXTRA_ARCHS',
'container-dummy-provides', 'container-dummy-provides', 'busybox', d)}"
IMAGE_CONTAINER_NO_DUMMY = "1"

inherit core-image
OCI_IMAGE_ENTRYPOINT = "/usr/bin/testapp"


IMAGE_ROOTFS_SIZE = "8192"
IMAGE_ROOTS_EXTRA_SPACE = "0"


Regards
Simon


On Fri, Feb 17, 2023 at 6:14 AM Bruce Ashfield <bruce.ashfield@gmail.com>
wrote:

> I'd suggest trying something we know is better tested before trying to
> load and run the OCI images directly.
>
> That error message normally means something is missing in your target
> image, a kernel configuration, or a support utility that docker
> requires.
>
> What is your MACHINE configuration ? I assume you are using master ?
> or is this an older release ?
>
> Can you try a simpler docker pull, docker run, test to confirm that
> official registry images work ?
>
> Bruce
>
> On Wed, Feb 15, 2023 at 1:08 PM SIMON BABY <simonkbaby@gmail.com> wrote:
> >
> > On Mon, Feb 13, 2023 at 04:51 PM, SIMON BABY wrote:
> >
> > docker: Error response from daemon: failed to create shim task: OCI
> runtime create failed: runc create failed: unable to start container
> process: can't get final child's PID from pipe: EOF: unknown.
> >
> > ERRO[0000] error waiting for container: context canceled
> >
> > Hello team,
> >  May i know the reason for the below error while trying to run the oci
> image from docker command.
> >
> > docker: Error response from daemon: failed to create shim task: OCI
> runtime create failed: runc create failed: unable to start container
> process: can't get final child's PID from pipe: EOF: unknown.
> >
> > ERRO[0000] error waiting for container: context canceled
> >
> > Regards
> > Simon
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#7855):
> https://lists.yoctoproject.org/g/meta-virtualization/message/7855
> > Mute This Topic: https://lists.yoctoproject.org/mt/96860300/1050810
> > Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> > Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub
> [bruce.ashfield@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II
>

[-- Attachment #2: Type: text/html, Size: 4486 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-02-17 15:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-09 19:02 query on container demo SIMON BABY
2023-02-10 14:29 ` [meta-virtualization] " Bruce Ashfield
2023-02-14  0:51   ` SIMON BABY
2023-02-15 18:08     ` SIMON BABY
2023-02-17 14:14       ` [meta-virtualization] " Bruce Ashfield
2023-02-17 15:29         ` SIMON BABY

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.