Open ivelin opened 4 years ago
I faced the same issue :
mkdir rootfs
sudo qemu-debootstrap --arch arm64 bionic ./rootfs
cd rootfs
sudo cp /usr/bin/qemu-aarch64-static usr/bin/
sudo mount --bind /dev/ dev/
sudo mount --bind /dev/pts/ dev/pts/
sudo mount --bind /sys/ sys/
sudo mount --bind /proc/ proc/
sudo chroot . /bin/bash
cat etc/apt/sources.list
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe multiverse
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted universe multiverse
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
deb [arch=arm64] https://download.docker.com/linux/ubuntu bionic stable
cat etc/apt/sources.list.d/nvidia-l4t-apt-source.list
deb https://repo.download.nvidia.com/jetson/common r32.4 main
deb https://repo.download.nvidia.com/jetson/t194 r32.4 main
apt update && apt install nvidia-docker2
dpkg -l | grep docker
ii docker-ce 5:20.10.0~2.1.rc1-0~ubuntu-bionic arm64 Docker: the open-source application container engine
ii docker-ce-cli 5:20.10.0~2.1.rc1-0~ubuntu-bionic arm64 Docker CLI: the open-source application container engine
ii docker-ce-rootless-extras 5:20.10.0~2.1.rc1-0~ubuntu-bionic arm64 Rootless support for Docker.
ii nvidia-docker2 2.2.0-1 all nvidia-docker CLI wrapper
docker ps -a
ERRO[0000] failure getting variant error="getCPUInfo for pattern: Cpu architecture: not found"
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
docker version
ERRO[0000] failure getting variant error="getCPUInfo for pattern: Cpu architecture: not found"
Client: Docker Engine - Community
Version: 20.10.0-rc1
API version: 1.41
Go version: go1.13.15
Git commit: 5cc2396
Built: Tue Nov 17 22:53:20 2020
OS/Arch: linux/arm64
Context: default
Experimental: true
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Any thoughts ?
Looks like this error is coming from the containerd client code; https://github.com/containerd/containerd/blob/d8527867057daa93c17423ec7cd3438696b1c899/platforms/cpuinfo.go#L44-L74
@MI-LA01 @ivelin could you post the output of cat /proc/cpuinfo
from your qemu environment ?
When trying to docker login
:
docker: unrecognized service
ERRO[0000] failure getting variant error="getCPUInfo for pattern: Cpu architecture: not found"
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Hello, did you succeed?
My workaround was to copy cpuinfo from rpi4 and bind mount it over /proc/cpuinfo in qeumu chroot
Expected behavior
Docker engine start.
Actual behavior
Docker engine fails to start with the following error:
Steps to reproduce the behavior
Fully reproducible environment available as github workflow:
https://github.com/ambianic/ambianic-rpi-image/runs/1405211947?check_suite_focus=true#step:9:4292
Context summary: The goal is to build a Raspberry Pi OS custom image with docker on it. We are using the official pi-gen project with a custom step that installs docker.
The step seems to succeed in installing docker, but when we try to actually run it we see the reported error message. Similar problems have been reported before:
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.)
Github workflow with Ubuntu Latest image. https://github.com/ambianic/ambianic-rpi-image/blob/46a5eea3a0451770947f27a60dbe360cc5614aaa/.github/workflows/main.yml