From 9c2f2d55a32b3b2f1c62e70b2f3e91ddbe46a18f Mon Sep 17 00:00:00 2001 From: idodod Date: Fri, 3 May 2024 12:31:14 -0400 Subject: [PATCH] Add new image for ubuntu 24.04 (#50) --- .github/renovate.json5 | 8 ++++++++ README.md | 3 +++ docs/dockerhub.md | 2 ++ os/ubuntu-24.04/Earthfile | 42 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 os/ubuntu-24.04/Earthfile diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 2ba3b24..a10c498 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -133,6 +133,14 @@ allowedVersions: "/^ubuntu-23\\.04-.*/", versioning: "regex:^(?.*)-(?\\d+\\.\\d+)-docker-(?\\d+)\\.(?\\d+)\\.(?\\d+)-(?\\d+)$", }, + { + // rule to update earthly/dind:ubuntu:24.04-* images + groupName: 'docs-dind-images', + matchPackageNames: ['earthly/dind'], + matchCurrentVersion: "/^ubuntu-24\\.04-.*/", + allowedVersions: "/^ubuntu-24\\.04-.*/", + versioning: "regex:^(?.*)-(?\\d+\\.\\d+)-docker-(?\\d+)\\.(?\\d+)\\.(?\\d+)-(?\\d+)$", + }, { // create PRs for multiple docker versions in case we're more than one major version behind matchPackageNames: [ diff --git a/README.md b/README.md index 91b0995..11c67ab 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ There are currently 3 supported dind distributions available: - `alpine` - `ubuntu:20.04` - `ubuntu:23.04` +- `ubuntu:24.04` Other distributions and/or base images can be used with our [dind+INSTALL](https://docs.earthly.dev/docs/guides/docker-in-earthly#performance) [FUNCTION](https://docs.earthly.dev/docs/guides/functions). @@ -39,6 +40,8 @@ dependencies that will trigger new versions of the dind images such as the docke │ └── Earthfile └── ubuntu-23.04 └── Earthfile + └── ubuntu-24.04 + └── Earthfile ``` ## Testing diff --git a/docs/dockerhub.md b/docs/dockerhub.md index 52af4bc..dcdca28 100644 --- a/docs/dockerhub.md +++ b/docs/dockerhub.md @@ -8,11 +8,13 @@ This image supports 3 Linux distributions: * alpine * ubuntu:20.04 * ubuntu:23.04 +* ubuntu:24.04 For which the current latest tags (respectively) are: * `alpine-3.19-docker-25.0.5-r0` * `ubuntu-20.04-docker-26.1.1-1` * `ubuntu-23.04-docker-25.0.2-1` +* `ubuntu-24.04-docker-26.1.0-1` For other available tags, please check out https://hub.docker.com/r/earthly/dind/tags diff --git a/os/ubuntu-24.04/Earthfile b/os/ubuntu-24.04/Earthfile new file mode 100644 index 0000000..8089fa2 --- /dev/null +++ b/os/ubuntu-24.04/Earthfile @@ -0,0 +1,42 @@ +VERSION --build-auto-skip 0.8 + +PROJECT earthly-technologies/core + +FROM alpine + +IMPORT ../../common AS common + +ARG --global OS_IMAGE=ubuntu + +ARG --global OS_VERSION=24.04 +# renovate: datasource=github-releases depName=docker/docker +LET docker_package_version=26.1.0 +ARG --global DOCKER_VERSION=5:$docker_package_version-1~ubuntu.$OS_VERSION~noble + +# DIR_PATH is set to that common targets can call os specific targets. It should match the directory name this Earthfile is located in +ARG --global DIR_PATH=$OS_IMAGE-$OS_VERSION + +# release builds the image using a new datetime as a suffix and run tests against the pushed image, then finally retag and push the image without the datetime suffix +release: + RUN --no-cache date --utc +%Y%m%d%H%M%S > datetime + LET datetime="$(cat datetime)" + WAIT + BUILD --pass-args common+build-and-test --SUFFIX=$datetime + END + COPY --dir --pass-args common+get-image-info/image-info . + LET image_tag="$(cat image-info/tag)-$datetime" + BUILD --pass-args common+push-new-tag-multi-platform --TAG_WITH_DATE=$image_tag + +# test-build will build a test image that is pushed to a temporary registry and run tests against it +test-build: + BUILD --pass-args common+build-and-test --IMAGE_NAME="dindtest" + +# build builds an dind:alpine image +build: + BUILD --pass-args --platform=linux/amd64 --platform=linux/arm64 common+build + +# test runs test for a dind:alpine image +# this is primarly used to run against a newly, temporariy image build by +test-build +test: + BUILD --pass-args common+ubuntu-kind-test + BUILD --pass-args common+test