Skip to content

Add multi-arch support for test images#5416

Merged
estesp merged 1 commit intocontainerd:masterfrom
dims:add-multi-arch-support-for-test-images-take-2
Apr 23, 2021
Merged

Add multi-arch support for test images#5416
estesp merged 1 commit intocontainerd:masterfrom
dims:add-multi-arch-support-for-test-images-take-2

Conversation

@dims
Copy link
Copy Markdown
Member

@dims dims commented Apr 23, 2021

  • Add a multi-arch image with linux/amd64 and linux/arm64 (limit to just
    what we are running in CI)
  • Bump versions to 2.0 as 1.0 is the single-arch image
  • Use docker buildx instead of just docker, so we don't need to build
    manifests by hand
  • busybox now does not have nogroup, since the test needs it, switch
    over from busybox to ubuntu for just the volume-ownership image

NOTE: not switching over integration/volume_copy_up_test.go to this newer image yet as it has not yet been pushed to the gcr repo.

Signed-off-by: Davanum Srinivas [email protected]

- Add a multi-arch image with linux/amd64 and linux/arm64 (limit to just
  what we are running in CI)
- Bump versions to 2.0 as 1.0 is the single-arch image
- Use `docker buildx` instead of just docker, so we don't need to build
  manifests by hand
- busybox now does not have `nogroup`, since the test needs it, switch
  over from busybox to ubuntu for just the volume-ownership image

Signed-off-by: Davanum Srinivas <[email protected]>
@dims
Copy link
Copy Markdown
Member Author

dims commented Apr 23, 2021

I used a personal gcr repo to test the generated images in #5414

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Apr 23, 2021

Build succeeded.

Comment thread integration/images/volume-ownership/Dockerfile
@dims
Copy link
Copy Markdown
Member Author

dims commented Apr 23, 2021

here's why we can't use busybox anymore for the ownership test

[dims@dims-a01 15:30] ~/go/src/sigs.k8s.io ⟩ docker run -it busybox sh
/ # grep -e nobody -e nogroup -e 65534 /etc/*
/etc/group:nobody:x:65534:
/etc/passwd:nobody:x:65534:65534:nobody:/home:/bin/false
/etc/shadow:nobody:*:::::::

Copy link
Copy Markdown
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.. just the one question do we need from ubuntu?

@dims
Copy link
Copy Markdown
Member Author

dims commented Apr 23, 2021

@mikebrow we need this line to pass:

assert.Equal(t, "nobody:nogroup\n", string(stdout))

picking up latest busybox fails as nogroup is missing in it (see snippet above). So we need ubuntu

here's where they yanked nogroup in busybox http://lists.busybox.net/pipermail/buildroot/2020-July/287170.html

@mikebrow
Copy link
Copy Markdown
Member

here's why we can't use busybox anymore for the ownership test

[dims@dims-a01 15:30] ~/go/src/sigs.k8s.io ⟩ docker run -it busybox sh
/ # grep -e nobody -e nogroup -e 65534 /etc/*
/etc/group:nobody:x:65534:
/etc/passwd:nobody:x:65534:65534:nobody:/home:/bin/false
/etc/shadow:nobody:*:::::::

yes well that will work much better under ubuntu :)

@dims
Copy link
Copy Markdown
Member Author

dims commented Apr 23, 2021

here's to show that nogroup is present in ubuntu and absent in busybox.

[dims@dims-a01 15:46] ~/go/src/sigs.k8s.io ⟩ docker run -it ubuntu
root@1a8db792a2da:/# grep -e nobody -e nogroup -e 65534 /etc/* 2>&1 | grep -v grep
/etc/group:nogroup:x:65534:
/etc/gshadow:nogroup:*::
/etc/passwd:sync:x:4:65534:sync:/bin:/bin/sync
/etc/passwd:nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
/etc/passwd:_apt:x:100:65534::/nonexistent:/usr/sbin/nologin
/etc/shadow:nobody:*:18718:0:99999:7:::

[dims@dims-a01 15:47] ~/go/src/sigs.k8s.io ⟩ docker run -it busybox sh
/ # grep -e nobody -e nogroup -e 65534 /etc/* 2>&1 | grep -v grep
/etc/group:nobody:x:65534:
/etc/passwd:nobody:x:65534:65534:nobody:/home:/bin/false
/etc/shadow:nobody:*:::::::

Copy link
Copy Markdown
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

4 participants