Open fracz opened 6 years ago
Some changes were merged since 18.03; from the top of my head; https://github.com/moby/moby/pull/36816, and https://github.com/moby/moby/pull/37350
@arm64b @tonistiigi any ideas?
The old behavior was to pick whatever arm image appeared in the manifest before. php:7.0.27-apache
has v5
and v7
in that order so I think old version used v5
. The new behavior matches the variant and if this fails, fall back to the old logic. There might be an issue in how containerd
platform package detects the variant for this particular system(maybe it detects it as v7
). cc @dmcgowan
Can I check how the containerd
detects the architecture?
uname -m
returns armv6l
.
I'm not too familiar with the containerd codebase, but based on some pull requests I noticed in this area, I think relevant code is in https://github.com/containerd/containerd/blob/db3c5afc6d61dc3bd1ac48a55156e58bf4557a45/platforms/platforms.go, https://github.com/containerd/containerd/blob/db3c5afc6d61dc3bd1ac48a55156e58bf4557a45/platforms/database.go
Some of those (possibly relevant) pull requests; https://github.com/containerd/containerd/pull/1403, https://github.com/containerd/containerd/pull/1575, https://github.com/containerd/containerd/pull/2416
@fracz docker run --rm tonistiigi/whatsmyarch
If this binary does not run, try it with a platform specific digest.
amd64 sha256:cea5cbde2d5913551aaad68bfe7b99f3455daabea25cbab2e66ed56ebf00743f
arm64 sha256:7d25fde96b3b02c483b10bc286b3d17ec3990fc1eeea6edc2f750cf5c8e84058
arm/v5 sha256:fed0405b8fe6d026e7ddbff6935f52b2dfe917e6aa5911a51a0f7b95afd6a7ff
arm/v6 sha256:5fec0e7e099ec3b3155b7dd05f806f9d2f9efdc2ba4ca0f6e7a3fd6878f733b0
arm/v7 sha256:ddb320f97028082f4bd64f3d9d511e500675f89d0c1b18a170e82fb143f4c719
ppc64le sha256:a8de29ed1ecdf6b4ba4f3642c88b92783c2da8a27a3b4e31778afb65b8c18d53
s390x sha256:97d973bae4df85fbcda9c6b5e682b27296da7ffe530548329d05b8cf05dd2331
source https://gist.github.com/tonistiigi/1884472203c6c86d06ac4bd01c726519
edit: you can also use the digests to check what variants execute on your system
ping @Pennyzct who is working on the multi-arch related stuff related with this, I am changing my tech direction...
@weichen81
I am changing my tech direction...
Thanks @arm64b - don't be a stranger π π€
Thanks @arm64b - don't be a stranger π π€
Thanks @thaJeztah , hmmm, I've decided to leave Arm and join an internet company, so I will not be stranger, but the account name arm64b
will be strangeπ€ π π πΉ π π π₯ π€
Hi~ @fracz the containerd check the /proc/cpuinfo to obtain the value of 'CPU Architecture'. if you have an armv6l chip, possibly you will get variant as 6. Like @tonistiigi said, if exact variant-matching couldn't work for you, docker will fall back to the old logic, which will choose the first entry for arm platform. So you could get the incompatible v7 image. after all, maybe docker engine should include the failure mode.π
Expected behavior
The following command
should work regardless of the Docker version on RaspberryPI Zero (ARMv6).
Actual behavior
The command above works on
18.03.0-ce
but fails with segfault on18.06.1-ce
.Additional environment details (AWS, VirtualBox, physical, etc.)
By inspecting the
docker images
followed bydocker image inspect
I found out, that the newer version of the Docker downloads another version of the container for some reason.On 18.03.0-ce it is
On 18.06.1-ce it is
They both claim they are built for arm architecture. However, the container that is downloaded with the newer Docker cannot be started. Logs of this container are empty. Trying to add
apt-get install
inside aDockerfile
based on thephp:7.0.27-apache
results in139
error code, which I googled out to be a segfault/architecture problem.I'm not sure if this is a problem with the image itself or with the Docker. I have tried another versions of
php:*-apache
and they behave the same way. After failed try on18.06
, I need to downgrade the docker to18.03.0-ce
, clean the images withdocker system prune -a
and then it starts to download the "correct" container that works as expected.