Skip to content

Provide docker images for alpine 3.12 (default), 3.13 and 3.14.

Georgi N. Georgiev requested to merge alpine-3-14 into main

What does this MR do?

Due to https://gitlab.com/gitlab-org/gitlab-runner/-/issues/27913 we need to provide an updated version of alpine to avoid security vulnerabilities.

We bumped to alpine 3.13 in !3057 (merged) as an intermediate step in order to avoid compability issues with older docker versions https://gitlab.com/gitlab-org/gitlab-runner/-/issues/27913#note_637754156

We then reverted back to 3.12 since customers reported issues with 3.13 !3157 (merged)


This MR should optimise the pipeline a bit since helper images and helper images binaries are now split, some jobs that only wanted the binaries now don't have to wait for all the helper images as well etc. Also the helper images building and pushing are parallel now.


With this MR we will introduce the following versions for the GitLab Runner and GitLab Runner Helper docker images:

  • gitlab-runner(-helper):alpine-{arch} (The default version is still alpine 3.12.0)
  • gitlab-runner(-helper):alpine3.12-{arch}
  • gitlab-runner(-helper):alpine3.13-{arch}
  • gitlab-runner(-helper):alpine3.14-{arch}

Note:

The alpine 3.13 and 3.14 images are not included in the packages final deb and rpm since that would increase the size of the packages astronomically, instead they will be pulled from our registry or DockerHub depending on the user's preference. There have also been ideas to not include them at all so I think this approach makes sense.

Why was this MR needed?

To allow for users to use newer alpine versions without breaking behavior for old users.

What's the best way to test this MR?

  • Make sure that the correct images and versions are generated and built for the helper images and development docker jobs

  • To test building and publishing Runner images run:

PUBLISH_IMAGES=true PUSH_TO_DOCKER_HUB=true DOCKER_HUB_USER=<YOUR_USER> DOCKER_HUB_PASSWORD=<YOUR_PASSWORD> DOCKER_HUB_NAMESPACE=<YOUR_USER> IMAGE_FLAVOR=alpine3.13 make release_docker_images

For image flavor use one of alpine, alpine3.13, alpine3.14, ubuntu

  • To test building and publishing Helper images run:
make helper-dockerarchive

This will build images for all platforms and architectures. Alternatively to build them separately run:

make "helper-dockerarchive-${IMAGE_BASE}"

Replace IMAGE_BASE with either alpine, alpine3.13, alpine3.14, ubuntu

To test the pushing and importing of the helper archives run the following commands:

PUBLISH_IMAGES=true PUSH_TO_DOCKER_HUB=true DOCKER_HUB_USER=<YOUR_USER> DOCKER_HUB_PASSWORD=<YOUR_PASSWORD> DOCKER_HUB_NAMESPACE=<YOUR_USER> IMAGE_FLAVOR=alpine3.12 IMAGE_TAG="" make release_helper_docker_images

PUBLISH_IMAGES=true PUSH_TO_DOCKER_HUB=true DOCKER_HUB_USER=<YOUR_USER> DOCKER_HUB_PASSWORD=<YOUR_PASSWORD> DOCKER_HUB_NAMESPACE=<YOUR_USER> IMAGE_FLAVOR=alpine3.12 IMAGE_TAG="alpine3.12-" make release_helper_docker_images

PUBLISH_IMAGES=true PUSH_TO_DOCKER_HUB=true DOCKER_HUB_USER=<YOUR_USER> DOCKER_HUB_PASSWORD=<YOUR_PASSWORD> DOCKER_HUB_NAMESPACE=<YOUR_USER> IMAGE_FLAVOR=alpine3.13 IMAGE_TAG="alpine3.13-" make release_helper_docker_images

PUBLISH_IMAGES=true PUSH_TO_DOCKER_HUB=true DOCKER_HUB_USER=<YOUR_USER> DOCKER_HUB_PASSWORD=<YOUR_PASSWORD> DOCKER_HUB_NAMESPACE=<YOUR_USER> IMAGE_FLAVOR=alpine3.14 IMAGE_TAG="alpine3.14-" make release_helper_docker_images

PUBLISH_IMAGES=true PUSH_TO_DOCKER_HUB=true DOCKER_HUB_USER=<YOUR_USER> DOCKER_HUB_PASSWORD=<YOUR_PASSWORD> DOCKER_HUB_NAMESPACE=<YOUR_USER> IMAGE_FLAVOR=ubuntu IMAGE_TAG="ubuntu-" make release_helper_docker_images

What are the relevant issue numbers?

Closes https://gitlab.com/gitlab-org/gitlab-runner/-/issues/27913

Edited by Arran Walker

Merge request reports

Loading