Docker downloads wrong container for architecture

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
baz123
Posts: 166
Joined: Thu Jan 12, 2017 9:23 pm

Docker downloads wrong container for architecture

Post by baz123 »

I'll admit it, Docker is impenetrable to me to understand, it usually just works.

On a fresh DietPi image, it has failed and it seems from the error message Docker has downloaded a container for the wrong architecture. Question is as part of the install should this be setup, and if not, how do I do it (raspberry Pi B+) so it downloads the correct container?

Cheers
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: Docker downloads wrong container for architecture

Post by MichaIng »

Hmm, sorry I have no experience with Docker, but it looks like when installing containers you have to take care yourself that it is for the right architecture (ARM), as of: https://blog.hypriot.com/getting-starte ... rm-device/
Here we run Docker on a Raspberry Pi. So the CPU architecture here is ARM rather than x86/x64 by Intel or AMD. Thus, Docker-based apps you use have to be packaged specifically for ARM architecture! Docker-based apps packaged for x86/x64 will not work and will result in an error such as:

Code: Select all

FATA[0003] Error response from daemon: Cannot start container 0f0fa3f8e510e53908e6a459e817d600b9649e621e7dede974d6a65761ad39e5: exec format error
Keep this in mind when searching for apps on the Docker Hub - the source for Docker apps/images. If you see the keyword RPI or ARM in the heading or description, this app can usually be used for the Raspberry Pi.
Does the error match yours?

Also found: https://blog.hypriot.com/post/port_dockerfiles_to_arm/

I hope this help, otherwise you'll need someone with some Docker on ARM production experience. Aside from that, all Guides that apply to RPi will most likely also work on DietPi, as our RPi image is based on the official Raspbian Lite.
luzifia
Posts: 48
Joined: Tue Jun 28, 2016 9:48 am

Re: Docker downloads wrong container for architecture

Post by luzifia »

@baz123

which image docker runs you have said to him.

you pull an image which is not the right architecture.
So please follow the link to docker hub
https://hub.docker.com/
there you'll find right containers.

always use RPi, armv7 or armhf or something like that if you search something on docker hub.

Code: Select all

cat /proc/cpuinfo
or direct
https://www.linuxserver.io/our-images

pull down some of these armhf containers

If these are your first steps in docker: use something called portainer ...
this is a webinterface for dockermanagment

or for raspberry only
https://blog.hypriot.com/getting-starte ... rm-device/

may you have a look at smokeping container - is funny and easy to run as well.

have fun :-)
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: Docker downloads wrong container for architecture

Post by MichaIng »

@luzifia @baz123
It's "raspberry Pi B+" so ARMv6.

But RPi and armhf should work in every case. Many thanks for the info that indeed one needs to take care about this oneself :).
baz123
Posts: 166
Joined: Thu Jan 12, 2017 9:23 pm

Re: Docker downloads wrong container for architecture

Post by baz123 »

Thanks for the replies. I ended up doing this a different way without a Docker - in fact I cannot remember what I was trying to download. I wondered if there should have been a setting created at install, that then told docker what architecture you were on. Still no point chasing this further. Cheers.
Post Reply