-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Allow pushing to apl-ocean-engineering * Install cppzmq-dev for Gazebo * Allow pushing to apl-ocean-engineering * Reverse change in docker.yaml action. * Preliminary version of docker-bake.hcl and updated Docker workflow. * Updated comments in Dockerfile * Attempt to allow manual triggering of builds * Nope, that's not it. * Add preliminary label to all Docker images. * Removed redundant libcppzmq-dev * Hack to lowercase repo name * Re-activate the metadata-action, go back to stages in matrix. * Add comment on lowercasing. * Place files config at correct level. * Re-activate the metadata-action, go back to stages in matrix. * Place files config at correct level. * Switch to registry cache for CI * Removed stage from matrix * Update repo URL, fix list formatting. (cherry picked from commit a8681d0) # Conflicts: # .github/workflows/docker.yaml
- Loading branch information
1 parent
2671559
commit 2b64ae9
Showing
3 changed files
with
179 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# | ||
# Override these variables with environment variables | ||
# e.g. | ||
# | ||
# BLUE_ROS_DISTRO=iron docker buildx bake | ||
# | ||
# or | ||
# | ||
# export BLUE_ROS_DISTRO=iron | ||
# docker buildx bake | ||
# | ||
variable "BLUE_ROS_DISTRO" { default = "rolling" } | ||
variable "BLUE_GITHUB_REPO" { default = "robotic-decision-making-lab/blue" } | ||
|
||
group "default" { | ||
targets = ["ci", "robot", "desktop", "desktop-nvidia"] | ||
} | ||
|
||
# These are populated by the metadata-action Github action for each target | ||
# when building in CI | ||
# | ||
target "docker-metadata-action-ci" {} | ||
target "docker-metadata-action-robot" {} | ||
target "docker-metadata-action-desktop" {} | ||
target "docker-metadata-action-desktop-nvidia" {} | ||
|
||
|
||
# | ||
# 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 "ci" { | ||
inherits = ["docker-metadata-action-ci"] | ||
dockerfile = ".docker/Dockerfile" | ||
target = "ci" | ||
context = ".." | ||
args = { | ||
ROS_DISTRO = "${BLUE_ROS_DISTRO}" | ||
} | ||
tags = [ | ||
"ghcr.io/${BLUE_GITHUB_REPO}:${BLUE_ROS_DISTRO}-ci" | ||
] | ||
labels = { | ||
"org.opencontainers.image.source" = "https://github.com/${BLUE_GITHUB_REPO}" | ||
} | ||
cache_from =[ | ||
"ghcr.io/${BLUE_GITHUB_REPO}:cache-${BLUE_ROS_DISTRO}-ci", | ||
"ghcr.io/${BLUE_GITHUB_REPO}:cache-${BLUE_ROS_DISTRO}-robot", | ||
"ghcr.io/${BLUE_GITHUB_REPO}:cache-${BLUE_ROS_DISTRO}-desktop", | ||
"ghcr.io/${BLUE_GITHUB_REPO}:cache-${BLUE_ROS_DISTRO}-desktop-nvidia", | ||
"type=local,dest=.docker-cache" | ||
] | ||
cache_to = [ | ||
"type=local,dest=.docker-cache" | ||
] | ||
platforms = ["linux/amd64", "linux/arm64"] | ||
} | ||
|
||
target "robot" { | ||
inherits = [ "ci", "docker-metadata-action-robot" ] | ||
target = "robot" | ||
tags = [ | ||
"ghcr.io/${BLUE_GITHUB_REPO}:${BLUE_ROS_DISTRO}-robot" | ||
] | ||
cache_to = [ | ||
"type=local,dest=.docker-cache" | ||
] | ||
} | ||
|
||
target "desktop" { | ||
inherits = [ "ci", "docker-metadata-action-desktop" ] | ||
target = "desktop" | ||
tags = [ | ||
"ghcr.io/${BLUE_GITHUB_REPO}:${BLUE_ROS_DISTRO}-desktop" | ||
] | ||
cache_to = [ | ||
"type=local,dest=.docker-cache" | ||
] | ||
# amd64 only builds for desktop and desktop-nvidia | ||
platforms = ["linux/amd64"] | ||
} | ||
|
||
target "desktop-nvidia" { | ||
inherits = [ "desktop", "docker-metadata-action-desktop-nvidia" ] | ||
target = "desktop-nvidia" | ||
tags = [ | ||
"ghcr.io/${BLUE_GITHUB_REPO}:${BLUE_ROS_DISTRO}-desktop-nvidia" | ||
] | ||
cache_to = [ | ||
"type=local,dest=.docker-cache" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,6 @@ mav.parm | |
mav.tlog | ||
mav.tlog.raw | ||
logs/ | ||
|
||
# Allow overrides in docker-bake | ||
.docker/docker-bake.override.hcl |