Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exec format error when running docker run ubuntu on ubuntu 14.04 #7924

Closed
techtonik opened this issue Sep 7, 2014 · 15 comments
Closed

exec format error when running docker run ubuntu on ubuntu 14.04 #7924

techtonik opened this issue Sep 7, 2014 · 15 comments

Comments

@techtonik
Copy link

$ sudo docker run ubuntu
[sudo] password for techtonik:
Unable to find image 'ubuntu' locally
Pulling repository ubuntu
826544226fdc: Download complete
511136ea3c5a: Download complete
b3553b91f79f: Download complete
ca63a3899a99: Download complete
ff01d67c9471: Download complete
7428bd008763: Download complete
c7c7108e0ad8: Download complete
2014/09/07 10:07:38 exec format error

The information requested (uname, docker version) is here - https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1366509

@fgrehm
Copy link
Contributor

fgrehm commented Sep 7, 2014

@techtonik you need to provide a command to docker run since the base ubuntu image does not define a default command. Assuming you want to start a bash session, would be a matter of running sudo docker run ubuntu /bin/bash

@tianon
Copy link
Member

tianon commented Sep 7, 2014

@techtonik as I noted on your Launchpad ticket (where you provided significantly more information), this is actually because you're trying to run a 64bit image on a 32bit OS installation, which is entirely unsupported - you'll have to find or create a 32bit base image somewhere if you want to continue with this host

@techtonik
Copy link
Author

@fgrehm, I tried to provide some commands, but the error is the same. docker info shows that containers are launched, but I can not access them. docker ps is empty/

@tianon, I found I686/ubuntu image, but still wasn't able to access them with docker. This is my first experience, so I may have missed something. Anyway, if 32bit hosts are not supported by LXC, I might have better luck with lmctfy.

@jessfraz
Copy link
Contributor

jessfraz commented Sep 7, 2014

I may be wrong but I don't think 64bit images are supported on a 32bit installation in lmctfy either

@techtonik
Copy link
Author

@jfrazelle may be, but I don't really need to run external images. All that I need is to get isolated environment on my own system to do some stuff and clean up afterwards. This is how I see it https://stackoverflow.com/questions/25709062/rapid-virtualization-with-fork-from-here-to-a-new-lxc-docker-container If you're familiar with Python, I want something like virtualenv, but on OS level.

@jessfraz
Copy link
Contributor

jessfraz commented Sep 7, 2014

That should be doable with using a 32bit image as the base.

On Sun, Sep 7, 2014 at 10:44 AM, anatoly techtonik <notifications@github.com

wrote:

@jfrazelle https://github.com/jfrazelle may be, but I don't really need
to run external images. All that I need is to get isolated environment on
my own system to do some stuff and clean up afterwards. This is how I see
it
https://stackoverflow.com/questions/25709062/rapid-virtualization-with-fork-from-here-to-a-new-lxc-docker-container
If you're familiar with Python, I want something like virtualenv, but on
OS level.


Reply to this email directly or view it on GitHub
#7924 (comment).

@tianon
Copy link
Member

tianon commented Sep 8, 2014

Indeed, if you do something like "docker import - ubuntu <
ubuntu-core-...-i386.tar.gz" you would likely be able to use it, but
otherwise this is working as designed. The images under i686/* are not
official in any capacity (either from Docker or from Canonical/Ubuntu).

@duglin
Copy link
Contributor

duglin commented Sep 23, 2014

Can we close this?

@techtonik
Copy link
Author

It is not a support ticket, isn't it? So what would be the reason to close
this?

@duglin
Copy link
Contributor

duglin commented Sep 29, 2014

Maybe I'm wrong but I thought the issue was that you're trying to run a 64 bit image on a 32 bit OS, which isn't do-able. You would need to do what @tianon mentioned to import/convert it. This feature request: #8256 might help in the future though.

@tianon
Copy link
Member

tianon commented Sep 29, 2014

Yes, I agree that this should be closed. It would be impossible for Docker
to run a 64bit image on a 32bit host even assuming we added official
support for 32bit hosts. For an unsupported host to work today, you must
roll your own images, as described previously.

@jessfraz
Copy link
Contributor

Closing

@techtonik
Copy link
Author

My mention of support ticket was a hint that the proper fix for this issue
is to warn users about the 64bit images on 32bit hosts until this is fixed.

@tianon
Copy link
Member

tianon commented Oct 1, 2014

Sure, when we actually support 32bit hosts, I agree completely that such a warning/error will be a very important thing for Docker to have. I think it will also be important for 64bit Docker instances to be able to craft images for 32bit hosts.

Today though, Docker as it stands in the officially supported upstream repo literally will not run on a 32bit host, as you can see here: https://github.com/docker/docker/blob/3f2e4e94d7dffe40a9cc1139cc2e6e5dcd1459f3/daemon/daemon.go#L1112-L1115

@techtonik
Copy link
Author

This hard requirement is bad to have, because IIUC it is not a docker "feature", but LXC limitation, so when LXC fixes that, doker will still be explicitly broken.

Giving warning with a reference to explanation Why? is enough. Link to explanation also increases chances that somebody curious like me can dedicate some time to fixing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants