Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: define all build args at the top of the Dockerfile #110

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions ros2_ws/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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}"
Expand Down