From b7cc6115dd82a835cbd10ea3f8feb256bae748b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B1=BC=E9=A6=99ROS?= <87068644+fishros@users.noreply.github.com> Date: Fri, 27 May 2022 19:52:04 +0800 Subject: [PATCH] =?UTF-8?q?[doc]:=E5=A2=9E=E5=8A=A0Dockerfile=E4=B8=AD?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e27a5f1..040d480 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ wget http://fishros.com/install -O fishros && . fishros ``` -## 如何自动选择 +## 如何自动选择(Dockerfile中使用) 目前一键安装支持从配置文件自动输入选项,你需要手动运行一次一键安装,使用完毕后会自动产生 `/tmp/fish_install.yaml`。 @@ -34,6 +34,26 @@ wget http://fishros.com/install -O fishros && . fishros cp /tmp/fish_install.yaml ./ ``` +### Dockerfile中使用 + +使用样例如下 + +``` +RUN apt update \ + && apt install wget python3-yaml -y \ + # 安装melodic + && echo "chooses:\n" > fish_install.yaml \ + && echo "- {choose: 1, desc: '一键安装:ROS(支持ROS和ROS2,树莓派Jetson)'}\n" >> fish_install.yaml \ + && echo "- {choose: 1, desc: 更换源继续安装}\n" >> fish_install.yaml \ + && echo "- {choose: 2, desc: 清理三方源}\n" >> fish_install.yaml \ + && echo "- {choose: 1, desc: melodic(ROS1)}\n" >> fish_install.yaml \ + && echo "- {choose: 1, desc: melodic(ROS1)桌面版}\n" >> fish_install.yaml \ + && wget http://fishros.com/install -O fishros && /bin/bash fishros \ + # 进行最后的清理 + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ + && apt-get clean && apt autoclean +``` + ## 贡献指南