Pre-built Docker-in-Docker (DinD) image used as a Jenkins build agent at IWF
1.2K
Pre-built Docker-in-Docker (DinD) image used as a Jenkins build agent at IWF.
Based on docker:dind, with bash, git, openssh-client and ca-certificates pre-installed and the git.iwf.io SSH host key pre-trusted. Built and pushed to Docker Hub by GitHub Actions.
docker pull iwfwebsolutions/ci-build-dind:latest
agent {
docker {
image 'iwfwebsolutions/ci-build-dind:latest'
// --privileged: dockerd needs it.
// -u 0:0: overrides Jenkins's auto-injected -u 1000:1000
// (last -u wins) so dockerd runs as root.
// --entrypoint: overrides Jenkins's auto -u --entrypoint cat;
// our script starts dockerd, waits for it, then execs cat,
// so steps see a ready `docker` daemon with no extra stage.
args '--privileged -u 0:0 --entrypoint /usr/local/bin/jenkins-dind-entrypoint'
reuseNode true
}
}
No Start DinD stage is needed in your pipeline — the entrypoint handles startup and readiness.
The entrypoint is also runnable standalone:
docker run --rm --privileged \
--entrypoint /usr/local/bin/jenkins-dind-entrypoint \
iwfwebsolutions/ci-build-dind:latest \
sh -c 'docker info'
docker build -t ci-build-dind:test ./src
Override the base tag via DOCKER_VERSION (defaults to dind):
docker build --build-arg DOCKER_VERSION=28-dind -t ci-build-dind:28 ./src
docker run --rm --privileged ci-build-dind:test sh -c \
'git --version && ssh -V && bash --version && grep git.iwf.io /root/.ssh/known_hosts'
brew install hadolint
hadolint src/Dockerfile
Pushes to main (and *.*.* tags) trigger .github/workflows/ci.yml, which builds linux/amd64 + linux/arm64 and pushes to Docker Hub.
Required repository configuration:
DOCKERHUB_USERNAME — Docker Hub user/org (e.g. iwfwebsolutions)IMAGE_NAME — full image name (e.g. iwfwebsolutions/ci-build-dind)DOCKERHUB_TOKEN — Docker Hub access token with push rightsBase image is unpinned (docker:dind → latest). Trigger a manual rebuild via the Actions → Continuous Integration → Run workflow button to pick up upstream patches.
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
See also the full list of contributors who participated in this project.
We're currently looking for contributions for the following:
For more information, please refer to our CONTRIBUTING.md guide.
This project is licensed under the MIT License - see the LICENSE.txt file for details
This project currently uses no third-party libraries or copied code.
Content type
Image
Digest
sha256:54b801b3e…
Size
135.1 MB
Last updated
5 months ago
docker pull iwfwebsolutions/ci-build-dind