Docker run giving different result to docker build (trying to use 32bit image on 64bit host)
I’m trying to use a 32-bit docker image (from https://registry.hub.docker.com/u/protomouse/debian-i386/) on my 64-bit machine and am getting a result I wasn’t expecting.
First up, I’m using boot2docker and have v1.5.0 of the boot2docker image (the current version). My machine is Darwin x86_64.
Once docker is all set up:
$> docker pull protomouse/debian-i386:wheezy $> docker run protomouse/debian-i386:wheezy uname -a Linux c16621f70b0d 3.18.5-tinycore64 #1 SMP Sun Feb 1 06:02:30 UTC 2015 i686 GNU/Linux
i686 is looking very promising in the result from
But when I go to making a dockerfile to extend the image, I get a different result. My dockerfile:
$> cat Dockerfile FROM protomouse/debian-i386:wheezy RUN uname -a
I build this with:
$> docker build --no-cache . Sending build context to Docker daemon 3.032 MB Sending build context to Docker daemon Step 0 : FROM protomouse/debian-i386:wheezy ---> 819840964f5f Step 1 : RUN uname -a ---> Running in defe4361f7db Linux 5eda7c5eb292 3.18.5-tinycore64 #1 SMP Sun Feb 1 06:02:30 UTC 2015 x86_64 GNU/Linux ---> 65df78215ee1 Removing intermediate container defe4361f7db Successfully built 65df78215ee1
Notice that the result of
uname -a is now telling me I have x86_64.
I’m fairly new to docker, so suspect I have fundamentally mis-understood the difference between the two operations, but I’d really appreciate it if anybody could shed any light on the matter.