mirror of
https://github.com/docker/build-push-action.git
synced 2025-06-11 05:37:12 +02:00
Handle build bake through bake, bake-files and bake-targets
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
4
test/Dockerfile-bake
Normal file
4
test/Dockerfile-bake
Normal file
@ -0,0 +1,4 @@
|
||||
FROM alpine
|
||||
|
||||
ARG name=world
|
||||
RUN echo "Hello ${name}!"
|
39
test/config.hcl
Normal file
39
test/config.hcl
Normal file
@ -0,0 +1,39 @@
|
||||
group "default" {
|
||||
targets = ["db", "app"]
|
||||
}
|
||||
|
||||
group "release" {
|
||||
targets = ["db", "app-plus"]
|
||||
}
|
||||
|
||||
target "db" {
|
||||
context = "./test"
|
||||
tags = ["docker.io/tonistiigi/db"]
|
||||
}
|
||||
|
||||
target "app" {
|
||||
context = "./test"
|
||||
dockerfile = "Dockerfile-bake"
|
||||
args = {
|
||||
name = "foo"
|
||||
}
|
||||
tags = [
|
||||
"localhost:5000/name/app:latest",
|
||||
"localhost:5000/name/app:1.0.0"
|
||||
]
|
||||
}
|
||||
|
||||
target "cross" {
|
||||
platforms = [
|
||||
"linux/amd64",
|
||||
"linux/arm64",
|
||||
"linux/386"
|
||||
]
|
||||
}
|
||||
|
||||
target "app-plus" {
|
||||
inherits = ["app", "cross"]
|
||||
args = {
|
||||
IAMPLUS = "true"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user