0

From the Stark Concourse tutorial

The following task will run the uname command with the -a switch on a docker-image tagged "14.04":

---
platform: linux

image_resource:
  type: docker-image
  source: {repository: ubuntu, tag: "14.04"}

run:
  path: uname
  args: [-a]

Result:

fly -t tutorial e -c task_ubuntu_uname.yml
executing build 10
initializing
running uname -a
Linux a0c3f38b-7dd3-4a8f-7b3e-e56ce2bf05e9 4.2.0-42-generic #49~14.04.1-Ubuntu SMP Wed Jun 29 20:22:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
succeeded

I'm curious why changing the tag doesn't change the version of Ubuntu:

---
platform: linux

image_resource:
  type: docker-image
  source: {repository: ubuntu, tag: "16.04"}

run:
  path: uname
  args: [-a]

Result:

fly -t tutorial e -c task_ubuntu_16_uname.yml
executing build 9
initializing
running uname -a
Linux 58069086-7a27-43f8-71ff-374bcaef0c6d 4.2.0-42-generic #49~14.04.1-Ubuntu SMP Wed Jun 29 20:22:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
succeeded

I see that the guids are different but I would expect the versions to be different too. Why isn't the version 16.04?

mbigras
  • 7,664
  • 11
  • 50
  • 111

1 Answers1

1

uname will get the version information of the host's kernel of the machine you're running on - this is not namespaced - so the container you're running isn't going to show.

if you are on an ubuntu host, and run docker run --rm -it centos uname -a, it will also still show the ubuntu kernel results.

SvenDowideit
  • 5,080
  • 1
  • 20
  • 10