mirror of
https://github.com/docker/build-push-action.git
synced 2025-04-22 14:46:39 +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:
parent
b07bd1f9df
commit
8be103ff82
9 changed files with 475 additions and 241 deletions
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"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue