From 7850927948d038b164f1df14a69ac66fb629d596 Mon Sep 17 00:00:00 2001 From: Ettore Landini Date: Fri, 12 Apr 2024 23:44:11 +0200 Subject: [PATCH] Parameters for Dockerfile --- doc/release/master.md | 5 +++++ docker/Dockerfile | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/release/master.md b/doc/release/master.md index 286dba55398..338baaa18e2 100644 --- a/doc/release/master.md +++ b/doc/release/master.md @@ -37,6 +37,11 @@ New Features * Added LLM_Message data type to propagate LLM answers +#### Docker +* Added two parameters to yarp `Dockerfile`: + * `base_img` to allow starting from different parent images + * `yarp_branch` to set the yarp version the users might need in their image + ### Devices #### controlboardremapper diff --git a/docker/Dockerfile b/docker/Dockerfile index ed38aa6540f..4dcc0164b44 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,5 @@ -FROM ubuntu:22.04 +ARG base_img=ubuntu:22.04 +FROM ${base_img} LABEL maintainer="Marco Randazzo" # Non-interactive installation mode @@ -116,9 +117,10 @@ RUN cd ycm && mkdir build && cd build && \ ENV YCM_DIR=/home/user1/robotology/ycm/build # Build YARP +ARG yarp_branch=master USER $robotology_install_user WORKDIR $robotology_install_folder -RUN git clone https://github.com/robotology/yarp.git -b master +RUN git clone https://github.com/robotology/yarp.git -b ${yarp_branch} RUN cd yarp && mkdir build && cd build && \ cmake .. \ -DCMAKE_BUILD_TYPE=Release \