Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
EARTHLY_CONVERSION_PARALLELISM: "5"
EARTHLY_INSTALL_ID: "earthbuild-dind-githubactions"
steps:
- uses: actions/checkout@v4
Copy link
Author

Choose a reason for hiding this comment

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

actions/checkout being the first step makes it easier to process the flow cognitively and not guess why it is in the middle of the execution sequence.

# The dind (common+alpine-kind-test and common+ubuntu-kind-test) detects
# the host's IPv6 capability and then requires IPv6 NAT to create networks
# for kind. So we load it here.
Expand All @@ -42,7 +43,6 @@ jobs:
- uses: earthbuild/actions-setup@main
with:
version: v0.8.15
- uses: actions/checkout@v4
- name: Log in to GitHub Container Registry (non fork only)
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
if: github.event.pull_request.head.repo.full_name == github.repository
Expand Down
39 changes: 27 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,40 @@ jobs:
name: release after merging ${{ github.head_ref }}
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'renovate/') && endsWith(github.head_ref, '-dind-image')
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
FORCE_COLOR: 1
EARTHLY_CONVERSION_PARALLELISM: "5"
EARTHLY_TOKEN: "${{ secrets.EARTHLY_TOKEN }}"
EARTHLY_INSTALL_ID: "earthly-dind-githubactions"
EARTHLY_INSTALL_ID: "earthbuild-dind-githubactions"
steps:
- uses: earthly/actions/setup-earthly@v1
- uses: actions/checkout@v4
# The dind (common+alpine-kind-test and common+ubuntu-kind-test) detects
# the host's IPv6 capability and then requires IPv6 NAT to create networks
# for kind. So we load it here.
# Ref: https://github.com/moby/moby/pull/47062
- name: Load kernel module IPv6 NAT
run: sudo modprobe ip6table_nat
- name: Set up Docker Hub mirrors
run: |
sudo mkdir -p /etc/docker
echo '{"registry-mirrors": ["https://mirror.gcr.io", "https://public.ecr.aws"]}' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker
- name: Set up QEMU
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static binfmt-support
sudo update-binfmts --display
- uses: earthbuild/actions-setup@main
with:
version: v0.8.15
- uses: actions/checkout@v4
- name: Docker login (non fork only)
- name: Log in to container registries (non fork only)
run: |-
docker login --username "${{ secrets.DOCKERHUB_USERNAME }}" --password "${{ secrets.DOCKERHUB_TOKEN }}"
docker login registry-1.docker.io.mirror.corp.earthly.dev --username "${{ secrets.DOCKERHUB_MIRROR_USERNAME }}" --password "${{ secrets.DOCKERHUB_MIRROR_PASSWORD }}"
if: github.event.pull_request.head.repo.full_name == github.repository
- name: Configure Earthly to use mirror (non fork only)
run: |-
earthly config global.buildkit_additional_config "'[registry.\"docker.io\"]
mirrors = [\"registry-1.docker.io.mirror.corp.earthly.dev\"]'"
docker login ghcr.io --username ${{ github.actor }} --password "${{ secrets.GITHUB_TOKEN }}"
if: github.event.pull_request.head.repo.full_name == github.repository
- name: Build & Push image
run: earthly --ci -P --push --org earthly-technologies --satellite dind +release --RENOVATE_BRANCH=${{github.head_ref}}
run: |
earthly --ci -P --push +release --RENOVATE_BRANCH=${{github.head_ref}} # default:ghcr.io
earthly --ci -P --push +release --RENOVATE_BRANCH=${{github.head_ref}} --CR_HOST=docker.io
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Earthly dind (Docker In Docker) Images
[![Release](https://github.com/earthly/dind/actions/workflows/release.yml/badge.svg)](https://github.com/earthly/dind/actions/workflows/release.yml)
![Docker Pulls](https://img.shields.io/docker/pulls/earthly/dind)
# EarthBuild dind (Docker In Docker) Images
[![Release](https://github.com/earthbuild/dind/actions/workflows/release.yml/badge.svg)](https://github.com/earthbuild/dind/actions/workflows/release.yml)
![Docker Pulls](https://img.shields.io/docker/pulls/earthbuild/dind)


Earthly's official [earthly/dind](https://hub.docker.com/repository/docker/earthly/dind/general) docker images.
For information on how to use these images, please refer to [docker in earthly](https://docs.earthly.dev/docs/guides/docker-in-earthly).
EarthBuilds's official [ghcr.io/earthbuild/dind](https://ghcr.io/earthbuild/dind) and [earthbuild/dind](https://hub.docker.com/r/earthlbuild/dind) container images.
For information on how to use these images, please refer to [docker in EarthBuild](https://docs.earthly.dev/docs/guides/docker-in-earthly).

## Supported Distributions

Expand All @@ -19,7 +19,7 @@ Other distributions and/or base images can be used with our [dind+INSTALL](https
## How Images are Built

In this repository, we maintain the OS & Docker versions that warrants releasing a new version of the image.
However, the installations of docker and other dependencies are done via an installation script that is currently maintained in [earthly/earthly](https://github.com/earthly/earthly).
However, the installations of docker and other dependencies are done via an installation script that is currently maintained in [earthbuild/earthbuild](https://github.com/earthbuild/earthbuild).

### Dependencies

Expand All @@ -46,7 +46,7 @@ dependencies that will trigger new versions of the dind images such as the docke

## Testing

Images are tested by running remote test targets that are maintained in [earthly/earthly](https://github.com/earthly/earthly/tree/main/tests/with-docker). This is because these tests also help test [WITH DOCKER](https://docs.earthly.dev/docs/earthfile#with-docker) command in earthly cli.
Images are tested by running remote test targets that are maintained in [earthbuild/earthbuild](https://github.com/earthbuild/earthbuild/tree/main/tests/with-docker). This is because these tests also help test [WITH DOCKER](https://docs.earthly.dev/docs/earthfile#with-docker) command in earthly cli.

Temporary images are built, pushed, and pulled as part of the test cycle.

Expand All @@ -69,11 +69,11 @@ Community members do not have permissions to push a built image and run the test

## Deployment

When the relevant dependencies are updates by Renovate, new images/tags will be pushed automatically to the docker registry.
When the relevant dependencies are updated by Renovate, new images/tags will be pushed automatically to the container registries - [ghcr.io/earthbuild/dind](https://ghcr.io/earthbuild/dind) and [earthbuild/dind](https://hub.docker.com/r/earthlbuild/dind).

## Contributing

* Please report bugs as [GitHub issues](https://github.com/earthly/dind/issues).
* Please report bugs as [GitHub issues](https://github.com/earthbuild/dind/issues).
* Join us on [Slack](https://earthly.dev/slack)!
* Questions via GitHub issues are welcome!
* PRs welcome! But please give a heads-up in a GitHub issue before starting work. If there is no GitHub issue for what you want to do, please create one.
Expand Down
5 changes: 3 additions & 2 deletions common/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,13 @@ push-new-tag:
exit 1
END
END
FROM $CR_ORG/$IMAGE_NAME:$TAG_WITH_DATE
ARG --required CR_HOST
FROM $CR_HOST/$CR_ORG/$IMAGE_NAME:$TAG_WITH_DATE
LET new_tag="$(echo ${TAG_WITH_DATE%-*})"
IF [ "$new_tag" = "$TAG_WITH_DATE" ]
RUN --no-cache echo "failed to remove date from tag $TAG_WITH_DATE" && exit 1
END
SAVE IMAGE --push $CR_ORG/$IMAGE_NAME:$new_tag
SAVE IMAGE --push $CR_HOST/$CR_ORG/$IMAGE_NAME:$new_tag

# push-new-tag-multi-platform builds push-new-tag using both amd64 & arm64 platforms.
push-new-tag-multi-platform:
Expand Down