diff --git a/ros_cross_compile/docker/runtime.Dockerfile b/ros_cross_compile/docker/runtime.Dockerfile index b43e7396..83e77691 100644 --- a/ros_cross_compile/docker/runtime.Dockerfile +++ b/ros_cross_compile/docker/runtime.Dockerfile @@ -7,6 +7,8 @@ ARG BASE_IMAGE FROM $BASE_IMAGE WORKDIR /ros_ws +RUN apt-get update && apt-get install -q -y --no-install-recommends less vim + ARG INSTALL_PATH COPY $INSTALL_PATH/ /ros_ws/install diff --git a/ros_cross_compile/pipeline_stages.py b/ros_cross_compile/pipeline_stages.py index 23d82835..349986e6 100644 --- a/ros_cross_compile/pipeline_stages.py +++ b/ros_cross_compile/pipeline_stages.py @@ -27,11 +27,15 @@ As such, the documentation for each customization can be found by looking at the argparse options in ros_cross_compile.py. """ -PipelineStageConfigOptions = NamedTuple('PipelineStageConfigOptions', - [('skip_rosdep_keys', List[str]), - ('custom_script', Optional[Path]), - ('custom_data_dir', Optional[Path]), - ('custom_setup_script', Optional[Path])]) +PipelineStageConfigOptions = NamedTuple( + 'PipelineStageConfigOptions', + [ + ('skip_rosdep_keys', List[str]), + ('custom_script', Optional[Path]), + ('custom_data_dir', Optional[Path]), + ('custom_setup_script', Optional[Path]), + ('runtime_tag', str), + ]) class PipelineStage(ABC): diff --git a/ros_cross_compile/ros_cross_compile.py b/ros_cross_compile/ros_cross_compile.py index 839957ec..9067850f 100644 --- a/ros_cross_compile/ros_cross_compile.py +++ b/ros_cross_compile/ros_cross_compile.py @@ -162,7 +162,10 @@ def parse_args(args: List[str]) -> argparse.Namespace: default=[], help='Skip these steps') parser.add_argument( - '--create-runtime-image', + '--runtime-tag', + type=str, + required=False, + default='cc-runtime', help='Create a Docker image with the specified name that contains all ' 'runtime dependencies and the created "install" directory for the workspace.') @@ -194,7 +197,8 @@ def cross_compile_pipeline( skip_rosdep_keys, custom_rosdep_script, custom_data_dir, - custom_setup_script) + custom_setup_script, + args.runtime_tag) for stage in stages: if stage.name not in args.skip_steps: diff --git a/ros_cross_compile/runtime.py b/ros_cross_compile/runtime.py index c3cee19c..bd7661ae 100644 --- a/ros_cross_compile/runtime.py +++ b/ros_cross_compile/runtime.py @@ -55,7 +55,9 @@ class PackageRuntimeImage(PipelineStage): def __init__(self): super().__init__('package_runtime') - def __call__(self, platform: Platform, docker_client: DockerClient, ros_workspace_dir: Path, - pipeline_stage_config_options: PipelineStageConfigOptions, - data_collector: DataCollector): - create_runtime_image(docker_client, platform, ros_workspace_dir, 'cc-runtime') + def __call__( + self, platform: Platform, docker_client: DockerClient, ros_workspace_dir: Path, + options: PipelineStageConfigOptions, + data_collector: DataCollector + ): + create_runtime_image(docker_client, platform, ros_workspace_dir, options.runtime_tag)