mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
bake: initial implementation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
2
hack/demo-env/examples/compose/Dockerfile
Normal file
2
hack/demo-env/examples/compose/Dockerfile
Normal file
@ -0,0 +1,2 @@
|
||||
FROM alpine:3.8
|
||||
RUN echo "this is db"
|
3
hack/demo-env/examples/compose/Dockerfile.webapp
Normal file
3
hack/demo-env/examples/compose/Dockerfile.webapp
Normal file
@ -0,0 +1,3 @@
|
||||
FROM alpine:3.8
|
||||
COPY Dockerfile /
|
||||
RUN env
|
12
hack/demo-env/examples/compose/compose.yml
Normal file
12
hack/demo-env/examples/compose/compose.yml
Normal file
@ -0,0 +1,12 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
db:
|
||||
build: .
|
||||
command: ./entrypoint.sh
|
||||
image: docker.io/tonistiigi/db
|
||||
webapp:
|
||||
build:
|
||||
dockerfile: Dockerfile.webapp
|
||||
args:
|
||||
buildno: 1
|
34
hack/demo-env/examples/compose/config.hcl
Normal file
34
hack/demo-env/examples/compose/config.hcl
Normal file
@ -0,0 +1,34 @@
|
||||
group "default" {
|
||||
targets = ["db", "webapp"]
|
||||
}
|
||||
|
||||
group "release" {
|
||||
targets = ["db", "webapp-plus"]
|
||||
}
|
||||
|
||||
target "db" {
|
||||
context = "./"
|
||||
tags = ["docker.io/tonistiigi/db"]
|
||||
}
|
||||
|
||||
target "webapp" {
|
||||
context = "./"
|
||||
dockerfile = "Dockerfile.webapp"
|
||||
args = {
|
||||
buildno = "123"
|
||||
}
|
||||
}
|
||||
|
||||
target "cross" {
|
||||
platforms = [
|
||||
"linux/amd64",
|
||||
"linux/arm64"
|
||||
]
|
||||
}
|
||||
|
||||
target "webapp-plus" {
|
||||
inherits = ["webapp", "cross"]
|
||||
args = {
|
||||
IAMPLUS = "true"
|
||||
}
|
||||
}
|
@ -1,2 +1,4 @@
|
||||
FROM alpine
|
||||
RUN touch foo
|
||||
RUN apk add --no-cache curl
|
||||
WORKDIR /src
|
||||
COPY . .
|
Reference in New Issue
Block a user