Docker Community Forums

Share and learn in the Docker community.

Ubuntu image appears to report that the kernel is Alpine not Ubuntu

(Npflood) #1

I’m running docker on a Mac using Docker Kitchen to do some integration tests. Unfortunately I’m having some trouble with the image that is being downloaded when I specify ubuntu-14.04 as my platform to test against.

The beginning of the process works fine, telling me that it has an appropriate image:

Creating default-ubuntu-1404…
Sending build context to Docker daemon 2.56kB
Step 1/12 : FROM ubuntu:14.04

BUT when I run cat /proc/version I get this output:

Linux version 4.9.60-linuxkit-aufs (root@4a42478ffb9a) (gcc version 6.3.0 (Alpine 6.3.0)

Any idea what I’m missing here?

(Sam) #2

what does uname -a show?

(Npflood) #3

uname -a

Linux b9a5bdc2eedc 4.9.60-linuxkit-aufs #1 SMP Mon Nov 6 16:00:12 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

cat /proc/version

Linux version 4.9.60-linuxkit-aufs (root@4a42478ffb9a) (gcc version 6.3.0 (Alpine 6.3.0) ) #1 SMP Mon Nov 6 16:00:12 UTC 2017

(Sam) #4

that is interesting

my real 14.04 system i use every day uname -a is

Linux buildserver 4.4.0-109-generic #132~14.04.1-Ubuntu SMP Tue Jan 9 21:46:42 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

and my docker ubuntu 14.04 image says

 "Id": "sha256:d6ed29ffda6b37d78b98cf4d2ca809df6366d6578c6704c233fa8c7b24a3caa4",
        "RepoTags": [
        "RepoDigests": [

from docker inspect image_id
and ITS uname -a

Linux 3e7cf01bae4b 4.4.0-109-generic #132~14.04.1-Ubuntu SMP Tue Jan 9 21:46:42 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

(Npflood) #5

This is what I was expecting. I can’t figure out why it would be saying Alpine at all, I don’t have any Alpine images downloaded.

(Sam) #6

i think U would purge that image a reload it

(Npflood) #7

So I purged everything, and even installed a different Ubuntu image (Ubuntu-updater14.04) Same output from the above commands.

(Sam) #8

so, I would guess that Docker Kitchen is not honoring your version info.
(based on my read of the docker Kitchen doc…)

(Npflood) #9

Thanks for all the thought you are putting into this.
I think it’s actually honoring the info based on this output at the container is created:

Testing [default-ubuntu-1404]
Creating [default-ubuntu-1404]…
Sending build context to Docker daemon 2.56kB
Step 1/12 : FROM ubuntu-upstart:14.04
14.04: Pulling from library/ubuntu-upstart
8387d9ff0016: Pulling fs layer
… (there is a lot of dlowloading pulling and waiting here)
6c7dda5571e4: Pull complete
Digest: sha256:465a0b00bd21b7140185931ebde658fc87511585617c424c85aec21090b56d0f
Status: Downloaded newer image for ubuntu-upstart:14.04
—> b28219773b9b
Step 2/12 : RUN dpkg-divert --local --rename --add /sbin/initctl
—> Running in 7a336f8757a6
Adding 'local diversion of /sbin/initctl to /sbin/initctl.distrib’
Removing intermediate container 7a336f8757a6
—> 61ed4bebaf10
Step 3/12 : RUN ln -sf /bin/true /sbin/initctl
—> Running in ed266319a139
Removing intermediate container ed266319a139
—> 0879d4645cad
Step 4/12 : ENV DEBIAN_FRONTEND noninteractive
—> Running in b3d060c7bd76
Removing intermediate container b3d060c7bd76
—> a0749ca4f7f6
Step 5/12 : RUN apt-get update
—> Running in 4d5577ce5a5c
Ign trusty InRelease
Get:1 trusty-updates InRelease [65.9 kB]
…Can’t include all of this because they’re seen as links…
Hit archive ubuntu com trusty/universe amd64 Packages
Fetched 4214 kB in 13s (303 kB/s)
Reading package lists…

And it goes on from there with lots of Ubuntu references.

(David Maze) #10

Docker containers share the kernel of the host system. The distro of the image (if any) doesn’t affect what gets reported in /proc. You’re seeing the kernel details of the hidden Linux VM that Docker for Mac runs.

(Npflood) #11

That was the explanation I was needing. I looked through the documentation, but didn’t see where this was mentioned. Thanks for the clarification. Any chance this can behavior can be modified? There are some scripts that use this data for their configuration and can’t be tested in Docker if this behavior persists.