Skip to content

Commit

Permalink
Add shim to build dever stage from debugger image
Browse files Browse the repository at this point in the history
to create dev container from CI images
with pre-built artifacts
  • Loading branch information
ruffsl committed Jul 10, 2024
1 parent 6126f1f commit 75b849b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .devcontainer/initialize-command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ set -eo pipefail
# Use first argument as target name
target=$1

################################################################################
# MARK: Pull image - download image from CI and AWS ECR for local dev container
# REFERENCE_IMAGE=ghcr.io/ros-navigation/navigation2:main-debugger
# docker pull $REFERENCE_IMAGE
# export DEV_FROM_STAGE=$REFERENCE_IMAGE
################################################################################

################################################################################
# MARK: Build image - bake image using local Dockerfile for local dev container
unset DEV_FROM_STAGE
################################################################################

# Bake the target and export locally to static tag
docker buildx bake --load \
--file docker-bake.hcl \
Expand Down
7 changes: 7 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,17 @@ target "tooler" {
// MARK: Development targets
################################################################################

variable "DEV_FROM_STAGE" {
default = "tooler"
}

target "dever" {
inherits = ["tooler"]
target = "dever"
tags = ["nav2:dever"]
args = {
DEV_FROM_STAGE = "${DEV_FROM_STAGE}",
}
}

target "seeder" {
Expand Down

0 comments on commit 75b849b

Please sign in to comment.