From 712b7122cde176be6e76f3b1a222d55bc8697933 Mon Sep 17 00:00:00 2001 From: Enrico Eberhard <32450951+eeberhard@users.noreply.github.com> Date: Mon, 13 May 2024 13:55:17 +0200 Subject: [PATCH] fix: define all build args at the top of the Dockerfile (#110) --- ros2_ws/Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ros2_ws/Dockerfile b/ros2_ws/Dockerfile index 3358682..69a8357 100644 --- a/ros2_ws/Dockerfile +++ b/ros2_ws/Dockerfile @@ -1,5 +1,8 @@ ARG BASE_IMAGE=docker.io/library/ros ARG BASE_TAG=iron +ARG ROS_DISTRO=iron +ARG VERSION=v0.0.0 + FROM ${BASE_IMAGE}:${BASE_TAG} as environment-variables ENV DEBIAN_FRONTEND=noninteractive ENV PYTHONWARNINGS=ignore:::setuptools.command.install,ignore:::setuptools.command.easy_install,ignore:::pkg_resources @@ -134,7 +137,6 @@ WORKDIR ${ROS2_WORKSPACE} RUN /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash; colcon build" RUN rm -rf ./src -ARG ROS_DISTRO=iron FROM ros2-control-${ROS_DISTRO} as ros2-control FROM environment-variables as final @@ -145,9 +147,6 @@ USER ${USER} WORKDIR ${ROS2_WORKSPACE} # Metadata -ARG BASE_IMAGE=docker.io/library/ros -ARG BASE_TAG=iron -ARG VERSION=v0.0.0 LABEL org.opencontainers.image.title="AICA ROS 2 image" LABEL org.opencontainers.image.description="AICA base ROS 2 image (includes ros2_control)" LABEL org.opencontainers.image.version="${VERSION}"