Dockerfile: add "all" stage to build binaries and extra tools
We still need a stage that build binaries and extra tools as well for
docker-ce-packaging repo: ff110508ff/static/Makefile (L41-L57)
This could be removed if we create a package for each project
like it's done in docker-packaging repo: https://github.com/docker/packaging/tree/main/pkg
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
113e95ec02
commit
e8a82ed24d
3 changed files with 26 additions and 1 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -110,7 +110,7 @@ jobs:
|
|||
name: Build
|
||||
uses: docker/bake-action@v2
|
||||
with:
|
||||
targets: binary
|
||||
targets: all
|
||||
set: |
|
||||
*.platform=${{ matrix.platform }}
|
||||
-
|
||||
|
|
11
Dockerfile
11
Dockerfile
|
@ -597,6 +597,17 @@ EOT
|
|||
FROM scratch AS binary
|
||||
COPY --from=build /build/ /
|
||||
|
||||
# usage:
|
||||
# > docker buildx bake all
|
||||
FROM scratch AS all
|
||||
COPY --from=tini /build/ /
|
||||
COPY --from=runc /build/ /
|
||||
COPY --from=containerd /build/ /
|
||||
COPY --from=rootlesskit /build/ /
|
||||
COPY --from=containerutil /build/ /
|
||||
COPY --from=vpnkit / /
|
||||
COPY --from=build /build /
|
||||
|
||||
# usage:
|
||||
# > make shell
|
||||
# > SYSTEMD=true make shell
|
||||
|
|
|
@ -124,6 +124,20 @@ target "binary-cross" {
|
|||
inherits = ["binary", "_platforms"]
|
||||
}
|
||||
|
||||
#
|
||||
# same as binary but with extra tools as well (containerd, runc, ...)
|
||||
#
|
||||
|
||||
target "all" {
|
||||
inherits = ["_common"]
|
||||
target = "all"
|
||||
output = [bindir(DOCKER_STATIC == "1" ? "binary" : "dynbinary")]
|
||||
}
|
||||
|
||||
target "all-cross" {
|
||||
inherits = ["all", "_platforms"]
|
||||
}
|
||||
|
||||
#
|
||||
# dev
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue