This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM4378: Running Docker Engine and small hello-world container

Part Number: AM4378

I am trying to get docker-container on AM4378.

Have created image with docker-ce enabled and when I check docker --version on target i do see docker-engine available

However when i try to get a image running[basic hello-world], I see various kernel configuration missing.

I added few based on my reading of this (Please find attached kernel config fragments I added)

But with this too, I get some more configuration missing.

I would like to know the exact kernel fragments I need to enable to run a docker image

I am using linux-4.19 kernel.

Would like to know, if this is even possible on Am437x and what needs to be done to enable this

TIA

-maheshG

docker-container.cfg

  • Hi Mahesh,

    our current TI SDK for AM437x v8.2 should support Docker right out of the box. Please download the SDK (https://www.ti.com/tool/PROCESSOR-SDK-AM437X) and try programming the tisdk-docker-rootfs-image-am437x-evm.wic.xz SD card image and see if this works for you. If it does, you can then go into the associated Yocto sources and figure out how it works / what makes it work, and apply that to your scenario as needed.

    $ ll ~/ti/ti-processor-sdk-linux-am437x-evm-08.02.00.24/filesystem/
    total 2121496
    drwxr-xr-x  2 a0797059 a0797059      4096 Jun  2  2022 ./
    drwxr-xr-x 22 a0797059 a0797059      4096 Jun 20 09:57 ../
    -rw-r--r--  1 a0797059 a0797059  30804840 Jun  2  2022 tisdk-base-image-am437x-evm.tar.xz
    -rw-r--r--  1 a0797059 a0797059  67895296 Jun  2  2022 tisdk-base-image-am437x-evm.ubi
    -rw-r--r--  1 a0797059 a0797059  36650560 Jun  2  2022 tisdk-base-image-am437x-evm.wic.xz
    -rw-r--r--  1 a0797059 a0797059 316343088 Jun  2  2022 tisdk-default-image-am437x-evm.tar.xz
    -rw-r--r--  1 a0797059 a0797059 854327296 Jun  2  2022 tisdk-default-image-am437x-evm.ubi
    -rw-r--r--  1 a0797059 a0797059 335075044 Jun  2  2022 tisdk-default-image-am437x-evm.wic.xz
    -rw-r--r--  1 a0797059 a0797059 102587944 Jun  2  2022 tisdk-docker-rootfs-image-am437x-evm.tar.xz
    -rw-r--r--  1 a0797059 a0797059 305135616 Jun  2  2022 tisdk-docker-rootfs-image-am437x-evm.ubi
    -rw-r--r--  1 a0797059 a0797059 107791688 Jun  2  2022 tisdk-docker-rootfs-image-am437x-evm.wic.xz
    -rw-r--r--  1 a0797059 a0797059   1667708 Jun  2  2022 tisdk-tiny-image-am437x-evm.tar.xz
    -rw-r--r--  1 a0797059 a0797059   7077888 Jun  2  2022 tisdk-tiny-image-am437x-evm.ubi
    -rw-r--r--  1 a0797059 a0797059   7027172 Jun  2  2022 tisdk-tiny-image-am437x-evm.wic.xz

    Regards, Andreas

  • Thanks for the response.

    As suggested u tried the "tisdk-docker-*" image.

    When i try to get a docker image i get errors asking to check if docker is running

    I tried couple of systemctl commands too to stat the docker but that too didnt help

    Attached is the logs of what i tried and the errors i see.

    Let me know your thoughts

    By the way i was able to get the docker image running on another hardware of mine which has Am62x processor.

    But i am looking to see if i can get this with AM4378. I am trying this on AM437x-SK-EVM

    ErrorOnAM437x-Evm-SK-Ti-Docker-Image.txt
    root@am437x-evm:~# docker pull ubuntu
    Using default tag: latest
    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
    root@am437x-evm:~# docker --version
    Docker version 19.03.8-ce, build afacb8b7f0
    root@am437x-evm:~# docker pull ubuntu
    Using default tag: latest
    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
    root@am437x-evm:~# systemctl start docker
    Job for docker.service failed because the control process exited with error code.
    See "systemctl status docker.service" and "journalctl -xe" for details.
    root@am437x-evm:~# docker pull ubuntu
    Using default tag: latest
    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
    root@am437x-evm:~# sudo dockerd
    -sh: sudo: command not found
    root@am437x-evm:~# dockerd
    INFO[2022-12-08T12:03:58.894209920Z] Starting up
    INFO[2022-12-08T12:03:58.914444262Z] libcontainerd: started new containerd process  pid=1267
    INFO[2022-12-08T12:03:58.914898442Z] parsed scheme: "unix"                         module=grpc
    INFO[2022-12-08T12:03:58.915033433Z] scheme "unix" not registered, fallback to default scheme  module=grpc
    INFO[2022-12-08T12:03:58.915233587Z] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0  <nil>}] <n                 il>}  module=grpc
    INFO[2022-12-08T12:03:58.915337872Z] ClientConn switching balancer to "pick_first"  module=grpc
    INFO[2022-12-08T12:03:59.163442205Z] starting containerd                           revision=3b3e9d5f62a114153829f9fbe2781d27b0a2ddac.m version=v                 1.2.14-3-g3b3e9d5f6.m
    INFO[2022-12-08T12:03:59.165696605Z] loading plugin "io.containerd.content.v1.content"...  type=io.containerd.content.v1
    INFO[2022-12-08T12:03:59.165986920Z] loading plugin "io.containerd.snapshotter.v1.aufs"...  type=io.containerd.snapshotter.v1
    WARN[2022-12-08T12:03:59.183355409Z] failed to load plugin io.containerd.snapshotter.v1.aufs  error="modprobe aufs failed: "modprobe: FATAL: Mod                 ule aufs not found in directory /lib/modules/5.10.100-g7a7a3af903\n": exit status 1"
    INFO[2022-12-08T12:03:59.183650266Z] loading plugin "io.containerd.snapshotter.v1.native"...  type=io.containerd.snapshotter.v1
    INFO[2022-12-08T12:03:59.184086280Z] loading plugin "io.containerd.snapshotter.v1.overlayfs"...  type=io.containerd.snapshotter.v1
    INFO[2022-12-08T12:03:59.184899770Z] loading plugin "io.containerd.snapshotter.v1.zfs"...  type=io.containerd.snapshotter.v1
    INFO[2022-12-08T12:03:59.186408425Z] skip loading plugin "io.containerd.snapshotter.v1.zfs"...  type=io.containerd.snapshotter.v1
    INFO[2022-12-08T12:03:59.186577331Z] loading plugin "io.containerd.metadata.v1.bolt"...  type=io.containerd.metadata.v1
    WARN[2022-12-08T12:03:59.186747612Z] could not use snapshotter aufs in metadata plugin  error="modprobe aufs failed: "modprobe: FATAL: Module au                 fs not found in directory /lib/modules/5.10.100-g7a7a3af903\n": exit status 1"
    WARN[2022-12-08T12:03:59.186860897Z] could not use snapshotter zfs in metadata plugin  error="path /var/lib/docker/containerd/daemon/io.containe                 rd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin"
    INFO[2022-12-08T12:03:59.187770173Z] loading plugin "io.containerd.differ.v1.walking"...  type=io.containerd.differ.v1
    INFO[2022-12-08T12:03:59.188029948Z] loading plugin "io.containerd.gc.v1.scheduler"...  type=io.containerd.gc.v1
    INFO[2022-12-08T12:03:59.188520001Z] loading plugin "io.containerd.service.v1.containers-service"...  type=io.containerd.service.v1
    INFO[2022-12-08T12:03:59.188678991Z] loading plugin "io.containerd.service.v1.content-service"...  type=io.containerd.service.v1
    INFO[2022-12-08T12:03:59.188836231Z] loading plugin "io.containerd.service.v1.diff-service"...  type=io.containerd.service.v1
    INFO[2022-12-08T12:03:59.188973555Z] loading plugin "io.containerd.service.v1.images-service"...  type=io.containerd.service.v1
    INFO[2022-12-08T12:03:59.189910830Z] loading plugin "io.containerd.service.v1.leases-service"...  type=io.containerd.service.v1
    INFO[2022-12-08T12:03:59.190094651Z] loading plugin "io.containerd.service.v1.namespaces-service"...  type=io.containerd.service.v1
    INFO[2022-12-08T12:03:59.190223518Z] loading plugin "io.containerd.service.v1.snapshots-service"...  type=io.containerd.service.v1
    INFO[2022-12-08T12:03:59.190341761Z] loading plugin "io.containerd.runtime.v1.linux"...  type=io.containerd.runtime.v1
    INFO[2022-12-08T12:03:59.191068340Z] loading plugin "io.containerd.runtime.v2.task"...  type=io.containerd.runtime.v2
    INFO[2022-12-08T12:03:59.191618555Z] loading plugin "io.containerd.monitor.v1.cgroups"...  type=io.containerd.monitor.v1
    INFO[2022-12-08T12:03:59.222241668Z] loading plugin "io.containerd.service.v1.tasks-service"...  type=io.containerd.service.v1
    INFO[2022-12-08T12:03:59.223764156Z] loading plugin "io.containerd.internal.v1.restart"...  type=io.containerd.internal.v1
    INFO[2022-12-08T12:03:59.225780654Z] loading plugin "io.containerd.grpc.v1.containers"...  type=io.containerd.grpc.v1
    INFO[2022-12-08T12:03:59.226692221Z] loading plugin "io.containerd.grpc.v1.content"...  type=io.containerd.grpc.v1
    INFO[2022-12-08T12:03:59.227274227Z] loading plugin "io.containerd.grpc.v1.diff"...  type=io.containerd.grpc.v1
    INFO[2022-12-08T12:03:59.227710157Z] loading plugin "io.containerd.grpc.v1.events"...  type=io.containerd.grpc.v1
    INFO[2022-12-08T12:03:59.228050303Z] loading plugin "io.containerd.grpc.v1.healthcheck"...  type=io.containerd.grpc.v1
    INFO[2022-12-08T12:03:59.228749717Z] loading plugin "io.containerd.grpc.v1.images"...  type=io.containerd.grpc.v1
    INFO[2022-12-08T12:03:59.229124777Z] loading plugin "io.containerd.grpc.v1.leases"...  type=io.containerd.grpc.v1
    INFO[2022-12-08T12:03:59.563340019Z] loading plugin "io.containerd.grpc.v1.namespaces"...  type=io.containerd.grpc.v1
    INFO[2022-12-08T12:03:59.563802407Z] loading plugin "io.containerd.internal.v1.opt"...  type=io.containerd.internal.v1
    INFO[2022-12-08T12:03:59.564699267Z] loading plugin "io.containerd.grpc.v1.snapshots"...  type=io.containerd.grpc.v1
    INFO[2022-12-08T12:03:59.565161655Z] loading plugin "io.containerd.grpc.v1.tasks"...  type=io.containerd.grpc.v1
    INFO[2022-12-08T12:03:59.565524424Z] loading plugin "io.containerd.grpc.v1.version"...  type=io.containerd.grpc.v1
    INFO[2022-12-08T12:03:59.565862402Z] loading plugin "io.containerd.grpc.v1.introspection"...  type=io.containerd.grpc.v1
    INFO[2022-12-08T12:03:59.572018515Z] serving...                                    address="/var/run/docker/containerd/containerd-debug.sock"
    INFO[2022-12-08T12:03:59.576147255Z] serving...                                    address="/var/run/docker/containerd/containerd.sock"
    INFO[2022-12-08T12:03:59.576453569Z] containerd successfully booted in 0.416637s
    INFO[2022-12-08T12:03:59.628039778Z] parsed scheme: "unix"                         module=grpc
    INFO[2022-12-08T12:03:59.628234099Z] scheme "unix" not registered, fallback to default scheme  module=grpc
    INFO[2022-12-08T12:03:59.628390631Z] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0  <nil>}] <n                 il>}  module=grpc
    INFO[2022-12-08T12:03:59.628479917Z] ClientConn switching balancer to "pick_first"  module=grpc
    INFO[2022-12-08T12:03:59.636255886Z] parsed scheme: "unix"                         module=grpc
    INFO[2022-12-08T12:03:59.636456748Z] scheme "unix" not registered, fallback to default scheme  module=grpc
    INFO[2022-12-08T12:03:59.636617571Z] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0  <nil>}] <n                 il>}  module=grpc
    INFO[2022-12-08T12:03:59.636799851Z] ClientConn switching balancer to "pick_first"  module=grpc
    ERRO[2022-12-08T12:03:59.654647936Z] Failed to built-in GetDriver graph btrfs /var/lib/docker
    ERRO[2022-12-08T12:03:59.675351757Z] failed to mount overlay: no such device       storage-driver=overlay2
    ERRO[2022-12-08T12:03:59.717666383Z] AUFS was not found in /proc/filesystems       storage-driver=aufs
    ERRO[2022-12-08T12:03:59.729761372Z] failed to mount overlay: no such device       storage-driver=overlay
    ERRO[2022-12-08T12:03:59.729972775Z] Failed to built-in GetDriver graph devicemapper /var/lib/docker
    WARN[2022-12-08T12:03:59.755072028Z] Your kernel does not support cgroup rt period
    WARN[2022-12-08T12:03:59.755357885Z] Your kernel does not support cgroup rt runtime
    WARN[2022-12-08T12:03:59.755485877Z] Your kernel does not support cgroup blkio weight
    WARN[2022-12-08T12:03:59.755726570Z] Your kernel does not support cgroup blkio weight_device
    WARN[2022-12-08T12:03:59.755853812Z] Your kernel does not support cgroup blkio throttle.read_bps_device
    WARN[2022-12-08T12:03:59.755960597Z] Your kernel does not support cgroup blkio throttle.write_bps_device
    WARN[2022-12-08T12:03:59.756061965Z] Your kernel does not support cgroup blkio throttle.read_iops_device
    WARN[2022-12-08T12:03:59.756158876Z] Your kernel does not support cgroup blkio throttle.write_iops_device
    WARN[2022-12-08T12:03:59.756282951Z] Unable to find cpuset cgroup in mounts
    INFO[2022-12-08T12:03:59.766733668Z] Loading containers: start.
    WARN[2022-12-08T12:03:59.791708554Z] Running modprobe bridge br_netfilter failed with message: modprobe: WARNING: Module br_netfilter not found                  in directory /lib/modules/5.10.100-g7a7a3af903
    , error: exit status 1
    WARN[2022-12-08T12:04:00.527426561Z] Could not load necessary modules for Conntrack: Running modprobe nf_conntrack_netlink failed with message:                  `modprobe: WARNING: Module nf_conntrack_netlink not found in directory /lib/modules/5.10.100-g7a7a3af903`, error: exit status 1
    INFO[2022-12-08T12:04:00.528869429Z] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to s                 et a preferred IP address
    INFO[2022-12-08T12:04:00.817166894Z] stopping event stream following graceful shutdown  error="context canceled" module=libcontainerd namespace=                 moby
    INFO[2022-12-08T12:04:00.818959657Z] stopping healthcheck following graceful shutdown  module=libcontainerd
    INFO[2022-12-08T12:04:00.829618241Z] stopping event stream following graceful shutdown  error="context canceled" module=libcontainerd namespace=                 plugins.moby
    failed to start daemon: Error initializing network controller: Error creating default "bridge" network: Failed to program NAT chain: Failed to i                 nject DOCKER in PREROUTING chain: iptables failed: iptables --wait -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER: iptables v1.8.4                  (legacy): Couldn't load match `addrtype':No such file or directory
    
    Try `iptables -h' or 'iptables --help' for more information.
     (exit status 2)
    root@am437x-evm:~# docker pull ubuntu
    Using default tag: latest
    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
    root@am437x-evm:~#
    root@am437x-evm:~# docker images
    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
    root@am437x-evm:~# docker ps -a
    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
    root@am437x-evm:~#
    root@am437x-evm:~# docker pull ubuntu
    Using default tag: latest
    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
    root@am437x-evm:~# docker --version
    Docker version 19.03.8-ce, build afacb8b7f0
    root@am437x-evm:~#
    root@am437x-evm:~# systemctl unmask docker
    root@am437x-evm:~# systemctl start docker
    Job for docker.service failed because the control process exited with error code.
    See "systemctl status docker.service" and "journalctl -xe" for details.
    root@am437x-evm:~#
    
    root@am437x-evm:~# systemctl status docker
    * docker.service - Docker Application Container Engine
         Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset>
         Active: failed (Result: exit-code) since Thu 2022-12-08 12:13:17 UTC; 1min>
    TriggeredBy: * docker.socket
           Docs: https://docs.docker.com
        Process: 1569 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FA>
       Main PID: 1569 (code=exited, status=1/FAILURE)
    
    Dec 08 12:13:17 am437x-evm systemd[1]: Failed to start Docker Application Conta>
    Dec 08 12:13:17 am437x-evm systemd[1]: docker.service: Scheduled restart job, r>
    Dec 08 12:13:17 am437x-evm systemd[1]: Stopped Docker Application Container Eng>
    Dec 08 12:13:17 am437x-evm systemd[1]: docker.service: Start request repeated t>
    Dec 08 12:13:17 am437x-evm systemd[1]: docker.service: Failed with result 'exit>
    Dec 08 12:13:17 am437x-evm systemd[1]: Failed to start Docker Application Conta>
    lines 1-14/14 (END)