Skip to content

Commit

Permalink
Add new image for ubuntu 24.04 (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
idodod authored May 3, 2024
1 parent 9696197 commit 9c2f2d5
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@
allowedVersions: "/^ubuntu-23\\.04-.*/",
versioning: "regex:^(?<compatibility>.*)-(?<major>\\d+\\.\\d+)-docker-(?<minor>\\d+)\\.(?<patch>\\d+)\\.(?<build>\\d+)-(?<revision>\\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:^(?<compatibility>.*)-(?<major>\\d+\\.\\d+)-docker-(?<minor>\\d+)\\.(?<patch>\\d+)\\.(?<build>\\d+)-(?<revision>\\d+)$",
},
{
// create PRs for multiple docker versions in case we're more than one major version behind
matchPackageNames: [
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions docs/dockerhub.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
42 changes: 42 additions & 0 deletions os/ubuntu-24.04/Earthfile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9c2f2d5

Please sign in to comment.