I just installed a brand new Ubuntu Server 14.04.2 LTS and also installed docker to run containers. I am facing some problems with it. A container will be used to run Jenkins and some of its jobs runs scripts to install Android NDK/SDK. These scripts are checking for the platform of the current machine using uname -p
command. This command runs well on the host machine but it returns unknown
in containers as follows:
lemonade@olympus:/$ docker info
Containers: 14
Images: 171
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Dirs: 199
Execution Driver: native-0.2
Kernel Version: 3.16.0-38-generic
WARNING: No swap limit support
lemonade@olympus:/$ uname -a
Linux olympus 3.16.0-38-generic #52~14.04.1-Ubuntu SMP Fri May 8 09:43:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
lemonade@olympus:/$ uname -p
x86_64
lemonade@olympus:/$ docker run -ti java:7 /bin/bash
root@c6cdbb8a64fb:/# uname -p
unknown
root@c6cdbb8a64fb:/# uname -a
Linux c6cdbb8a64fb 3.16.0-38-generic #52~14.04.1-Ubuntu SMP Fri May 8 09:43:57 UTC 2015 x86_64 GNU/Linux
Does anyone knows why are the containers returning this? Some scripts (which are not coded by us) use this, as well as a lot of makefiles.
Thanks!
I don't know the exact reason why
uname -p
fail with thejava:7
docker image but it seems to be due to the dockerdebian
image. With theubuntu
docker image, everything is fine.If you look at the Dockerfile dependencies for the
java:7
docker image you find out the following:java:7
→buildpack-deps:jessie-scm
→buildpack-deps:jessie-curl
→debian:jessie
The only thing that breaks the
uname -p
is the dependency ondebian:jessie
. What could do is to build your ownjava:7
docker image, but making it depend onubuntu
instead ofdebian
.For that you would have to come up with a Dockerfile which is a merge of the ones used to make the
java:7
image.