-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-bake.hcl
42 lines (40 loc) · 915 Bytes
/
docker-bake.hcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#
# Override these variables with environment variables
# e.g.
#
# IMAGE_ROS_DISTRO=iron docker buildx bake
#
# or
#
# export IMAGE_ROS_DISTRO=iron
# docker buildx bake
#
variable "IMAGE_ROS_DISTRO" { default = "rolling" }
variable "IMAGE_GITHUB_REPO" { default = "apl-ocean-engineering/foxglove-bridge" }
group "default" {
targets = ["foxglove-bridge"]
}
#
# All images can pull cache from the images published at Github
# or local storage (within the Buildkit image)
#
# ... and push cache to local storage
#
target "foxglove-bridge" {
dockerfile = "Dockerfile"
context = "."
args = {
ROS_DISTRO = "${IMAGE_ROS_DISTRO}"
}
tags = [
"ghcr.io/${IMAGE_GITHUB_REPO}:${IMAGE_ROS_DISTRO}"
]
cache_from =[
"ghcr.io/${IMAGE_GITHUB_REPO}:${IMAGE_ROS_DISTRO}",
"type=local,dest=.docker-cache"
]
cache_to = [
"type=local,dest=.docker-cache"
]
platforms = ["linux/amd64"]
}