mirror of
https://github.com/moby/moby.git
synced 2026-01-11 02:31:44 +00:00
dockerfile: dind target to build docker image for testing
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@@ -154,3 +154,23 @@ jobs:
|
|||||||
uses: github/codeql-action/upload-sarif@v3
|
uses: github/codeql-action/upload-sarif@v3
|
||||||
with:
|
with:
|
||||||
sarif_file: ${{ env.DESTDIR }}/govulncheck.out
|
sarif_file: ${{ env.DESTDIR }}/govulncheck.out
|
||||||
|
|
||||||
|
build-dind:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
needs:
|
||||||
|
- validate-dco
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
version: ${{ env.SETUP_BUILDX_VERSION }}
|
||||||
|
driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }}
|
||||||
|
buildkitd-flags: --debug
|
||||||
|
-
|
||||||
|
name: Build dind image
|
||||||
|
uses: docker/bake-action@v6
|
||||||
|
with:
|
||||||
|
targets: dind
|
||||||
|
set: |
|
||||||
|
*.output=type=cacheonly
|
||||||
|
|||||||
@@ -657,6 +657,15 @@ FROM dev-base AS devcontainer
|
|||||||
COPY --link . .
|
COPY --link . .
|
||||||
COPY --link --from=gopls /build/ /usr/local/bin/
|
COPY --link --from=gopls /build/ /usr/local/bin/
|
||||||
|
|
||||||
|
# usage:
|
||||||
|
# > docker buildx bake dind
|
||||||
|
# > docker run -d --restart always --privileged --name devdind -p 12375:2375 docker-dind --debug --host=tcp://0.0.0.0:2375 --tlsverify=false
|
||||||
|
FROM docker:dind AS dind
|
||||||
|
COPY --link --from=dockercli /build/docker /usr/local/bin/
|
||||||
|
COPY --link --from=buildx /buildx /usr/local/libexec/docker/cli-plugins/docker-buildx
|
||||||
|
COPY --link --from=compose /docker-compose /usr/local/libexec/docker/cli-plugins/docker-compose
|
||||||
|
COPY --link --from=all / /usr/local/bin/
|
||||||
|
|
||||||
# usage:
|
# usage:
|
||||||
# > make shell
|
# > make shell
|
||||||
# > SYSTEMD=true make shell
|
# > SYSTEMD=true make shell
|
||||||
|
|||||||
@@ -164,6 +164,17 @@ target "bin-image-cross" {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# dind
|
||||||
|
#
|
||||||
|
|
||||||
|
target "dind" {
|
||||||
|
inherits = ["_common"]
|
||||||
|
target = "dind"
|
||||||
|
tags = ["docker-dind"]
|
||||||
|
output = ["type=docker"]
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# dev
|
# dev
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user