-
Notifications
You must be signed in to change notification settings - Fork 61
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
feat: Update base image #53
Conversation
Warning Review failedThe pull request is closed. WalkthroughThe project has introduced and updated several GitHub Actions workflows for building, testing, and deploying ROS distributions (Melodic and Noetic). Additionally, Dockerfiles for both distributions have been significantly modified to update base images, install necessary packages, and configure environments. The Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 9
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- melodic/Dockerfile (1 hunks)
- noetic/Dockerfile (1 hunks)
Files not reviewed due to errors (1)
- melodic/Dockerfile (no review received)
Additional context used
Hadolint
noetic/Dockerfile
[warning] 33-33: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
[info] 33-33: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[warning] 41-41: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
[info] 41-41: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[info] 53-53: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[info] 54-54: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[info] 57-57: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[info] 60-60: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[info] 61-61: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[info] 64-64: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[warning] 64-64: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
[warning] 76-76: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check (DL4006)
[warning] 76-76: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
[info] 76-76: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[info] 76-76: Avoid use of wget without progress bar. Use
wget --progress=dot:giga <url>
. Or consider using-q
or-nv
(shorthands for--quiet
or--no-verbose
). (DL3047)
[warning] 91-91: Either use Wget or Curl but not both (DL4001)
[info] 91-91: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[warning] 91-91: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check (DL4006)
[warning] 91-91: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
[info] 111-111: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[warning] 111-111: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)melodic/Dockerfile
[warning] 37-37: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
[info] 37-37: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[warning] 45-45: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
[info] 45-45: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[warning] 61-61: Pin versions in pip. Instead of
pip install <package>
usepip install <package>==<version>
orpip install --requirement <requirements file>
(DL3013)
[info] 67-67: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[info] 68-68: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[info] 71-71: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[info] 74-74: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[info] 75-75: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[info] 78-78: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[warning] 78-78: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
[info] 91-91: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[warning] 104-104: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
[info] 104-104: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[warning] 104-104: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check (DL4006)
[info] 120-120: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[warning] 120-120: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
Additional comments not posted (4)
noetic/Dockerfile (4)
18-18
: Update toubuntu:focal-20240427
base image is noted.
23-23
: Setting the default shell to bash is a good practice for script compatibility.
111-117
: Conditional installation foramd64
architecture is handled correctly.Tools
Hadolint
[info] 111-111: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[warning] 111-111: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
20-20
: EnsureTARGETPLATFORM
is used appropriately in multi-platform builds.Verification successful
The
TARGETPLATFORM
argument is used in thenoetic/Dockerfile
as follows:
- Defined with
ARG TARGETPLATFORM
.- Used in a
RUN
command to check if the platform islinux/amd64
.This indicates that
TARGETPLATFORM
is being utilized appropriately for multi-platform builds.
noetic/Dockerfile
:
ARG TARGETPLATFORM
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify usage of TARGETPLATFORM in Dockerfile. # Test: Search for TARGETPLATFORM usage. Expect: Proper usage in multi-platform specific commands. rg --type dockerfile $'TARGETPLATFORM' noetic/DockerfileLength of output: 90
Script:
#!/bin/bash # Description: Verify usage of TARGETPLATFORM in Dockerfile. # Test: Search for TARGETPLATFORM usage. Expect: Proper usage in multi-platform specific commands. rg --type Dockerfile 'TARGETPLATFORM' noetic/DockerfileLength of output: 90
Script:
#!/bin/bash # Description: Verify usage of TARGETPLATFORM in Dockerfile. # Test: Search for TARGETPLATFORM usage. Expect: Proper usage in multi-platform specific commands. rg 'TARGETPLATFORM' noetic/DockerfileLength of output: 109
RUN apt-get update -q && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \ | ||
apt-get autoclean && \ | ||
apt-get autoremove && \ | ||
rm -rf /var/lib/apt/lists/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider reducing the number of layers by combining apt-get update
and apt-get install
commands.
- RUN apt-get update -q && \
- DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
- apt-get autoclean && \
- apt-get autoremove && \
- rm -rf /var/lib/apt/lists/*
+ RUN apt-get update -q && \
+ DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && apt-get autoclean && apt-get autoremove && \
+ rm -rf /var/lib/apt/lists/*
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
RUN apt-get update -q && \ | |
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \ | |
apt-get autoclean && \ | |
apt-get autoremove && \ | |
rm -rf /var/lib/apt/lists/* | |
RUN apt-get update -q && \ | |
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && apt-get autoclean && apt-get autoremove && \ | |
rm -rf /var/lib/apt/lists/* |
fi | ||
|
||
# Enable apt-get completion after running `apt-get update` in the container | ||
RUN rm /etc/apt/apt.conf.d/docker-clean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unnecessary apt-get update
calls to optimize build time and reduce network usage.
- RUN apt-get update -q && apt-get install -y ros-${ROS_DISTRO}-gazebo-ros-pkgs && rm -rf /var/lib/apt/lists/*
+ RUN apt-get install -y ros-${ROS_DISTRO}-gazebo-ros-pkgs && rm -rf /var_lib/apt/lists/*
Committable suggestion was skipped due to low confidence.
# Install Ubuntu Mate desktop | ||
RUN apt-get update -q && \ | ||
apt-get upgrade -yq && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -yq wget curl git build-essential vim sudo lsb-release locales bash-completion tzdata gosu && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
ubuntu-mate-desktop && \ | ||
apt-get autoclean && \ | ||
apt-get autoremove && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pin versions of critical packages to ensure reproducibility.
- RUN apt-get update -q && \
- DEBIAN_FRONTEND=noninteractive apt-get install -y ubuntu-mate-desktop && \
- apt-get autoclean && \
- apt-get autoremove && \
- rm -rf /var/lib/apt/lists/*
+ RUN apt-get update -q && \
+ DEBIAN_FRONTEND=noninteractive apt-get install -y ubuntu-mate-desktop=<version> && \
+ apt-get autoclean && \
+ apt-get autoremove && \
+ rm -rf /var/lib/apt/lists/*
Committable suggestion was skipped due to low confidence.
Tools
Hadolint
[warning] 33-33: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
[info] 33-33: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
RUN wget https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \ | ||
-O /usr/share/keyrings/vscodium-archive-keyring.asc && \ | ||
echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.asc ] https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs vscodium main' \ | ||
| tee /etc/apt/sources.list.d/vscodium.list && \ | ||
apt-get update -q && \ | ||
apt-get install -y codium && \ | ||
apt-get autoclean && \ | ||
apt-get autoremove && \ | ||
rm -rf /var/lib/apt/lists/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use wget --progress=dot:giga
for better progress visibility during downloads.
- wget https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg -O /usr/share/keyrings/vscodium-archive-keyring.asc
+ wget --progress=dot:giga https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg -O /usr/share/keyrings/vscodium-archive-keyring.asc
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
RUN wget https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \ | |
-O /usr/share/keyrings/vscodium-archive-keyring.asc && \ | |
echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.asc ] https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs vscodium main' \ | |
| tee /etc/apt/sources.list.d/vscodium.list && \ | |
apt-get update -q && \ | |
apt-get install -y codium && \ | |
apt-get autoclean && \ | |
apt-get autoremove && \ | |
rm -rf /var/lib/apt/lists/* | |
RUN wget --progress=dot:giga https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \ | |
-O /usr/share/keyrings/vscodium-archive-keyring.asc && \ | |
echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.asc ] https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs vscodium main' \ | |
| tee /etc/apt/sources.list.d/vscodium.list && \ | |
apt-get update -q && \ | |
apt-get install -y codium && \ | |
apt-get autoclean && \ | |
apt-get autoremove && \ | |
rm -rf /var/lib/apt/lists/* |
Tools
Hadolint
[warning] 76-76: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check (DL4006)
[warning] 76-76: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
[info] 76-76: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[info] 76-76: Avoid use of wget without progress bar. Use
wget --progress=dot:giga <url>
. Or consider using-q
or-nv
(shorthands for--quiet
or--no-verbose
). (DL3047)
RUN sed -i "s/UI.initSetting('resize', 'off');/UI.initSetting('resize', 'remote');/g" /usr/lib/novnc/app/ui.js | ||
|
||
# Disable auto update and crash report | ||
RUN sed -i 's/Prompt=.*/Prompt=never/' /etc/update-manager/release-upgrades | ||
RUN sed -i 's/enabled=1/enabled=0/g' /etc/default/apport |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optimize sed
commands by combining them into a single RUN
instruction.
- RUN sed -i "s/UI.initSetting('resize', 'off');/UI.initSetting('resize', 'remote');/g" /usr/lib/novnc/app/ui.js
- RUN sed -i 's/Prompt=.*/Prompt=never/' /etc/update-manager/release-upgrades
- RUN sed -i 's/enabled=1/enabled=0/g' /etc/default/apport
+ RUN sed -i "s/UI.initSetting('resize', 'off');/UI.initSetting('resize', 'remote');/g" /usr_lib/novnc/app/ui.js && \
+ sed -i 's/Prompt=.*/Prompt=never/' /etc/update-manager/release-upgrades && \
+ sed -i 's/enabled=1/enabled=0/g' /etc/default/apport
Committable suggestion was skipped due to low confidence.
Tools
Hadolint
[info] 57-57: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[info] 60-60: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[info] 61-61: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
RUN git clone https://github.com/AtsushiSaito/noVNC.git -b add_clipboard_support /usr/lib/novnc | ||
RUN pip install --no-cache-dir git+https://github.com/novnc/websockify.git@v0.10.0 | ||
RUN ln -s /usr/lib/novnc/vnc.html /usr/lib/novnc/index.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combine RUN
instructions related to noVNC and Websockify to optimize Docker layers.
- RUN git clone https://github.com/AtsushiSaito/noVNC.git -b add_clipboard_support /usr/lib/novnc
- RUN pip install --no-cache-dir git+https://github.com/novnc/websockify.git@v0.10.0
- RUN ln -s /usr/lib/novnc/vnc.html /usr/lib/novnc/index.html
+ RUN git clone https://github.com/AtsushiSaito/noVNC.git -b add_clipboard_support /usr/lib/novnc && \
+ pip install --no-cache-dir git+https://github.com/novnc/websockify.git@v0.10.0 && \
+ ln -s /usr/lib/novnc/vnc.html /usr_lib/novnc/index.html
Committable suggestion was skipped due to low confidence.
Tools
Hadolint
[info] 53-53: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[info] 54-54: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
RUN apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
tigervnc-standalone-server tigervnc-common \ | ||
supervisor wget curl gosu git sudo python3-pip tini \ | ||
build-essential vim sudo lsb-release locales \ | ||
bash-completion tzdata terminator && \ | ||
apt-get autoclean && \ | ||
apt-get autoremove && \ | ||
rm -rf /var/lib/apt/lists/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consolidate RUN
instructions to reduce layers and improve build efficiency.
- RUN apt-get update && \
- DEBIAN_FRONTEND=noninteractive apt-get install -y \
- tigervnc-standalone-server tigervnc-common \
- supervisor wget curl gosu git sudo python3-pip tini \
- build-essential vim sudo lsb-release locales \
- bash-completion tzdata terminator && \
- apt-get autoclean && \
- apt-get autoremove && \
- rm -rf /var/lib/apt/lists/*
+ RUN apt-get update && \
+ DEBIAN_FRONTEND=noninteractive apt-get install -y tigervnc-standalone-server tigervnc-common supervisor wget curl gosu git sudo python3-pip tini build-essential vim sudo lsb-release locales bash-completion tzdata terminator && \
+ apt-get autoclean && \
+ apt-get autoremove && \
+ rm -rf /var_lib/apt/lists/*
Committable suggestion was skipped due to low confidence.
Tools
Hadolint
[warning] 41-41: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
[info] 41-41: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
RUN apt-get update -q && \ | ||
apt-get install -y curl gnupg2 lsb-release && \ | ||
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \ | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros.list > /dev/null && \ | ||
apt-get update -q && \ | ||
apt-get install -y ros-${ROS_DISTRO}-${INSTALL_PACKAGE} \ | ||
python3-rosinstall \ | ||
python3-rosinstall-generator \ | ||
python3-wstool \ | ||
python3-catkin-tools \ | ||
python3-osrf-pycommon \ | ||
python3-argcomplete \ | ||
python3-rosdep python3-vcstool && \ | ||
rosdep init && \ | ||
rm -rf /var/lib/apt/lists/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure all package versions are pinned to avoid potential incompatibilities.
- RUN apt-get update -q && \
- apt-get install -y curl gnupg2 lsb-release && \
- curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
- echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros.list > /dev/null && \
- apt-get update -q && \
- apt-get install -y ros-${ROS_DISTRO}-${INSTALL_PACKAGE} \
- python3-rosinstall \
- python3-rosinstall-generator \
- python3-wstool \
- python3-catkin-tools \
- python3-osrf-pycommon \
- python3-argcomplete \
- python3-rosdep python3-vcstool && \
- rosdep init && \
- rm -rf /var_lib/apt/lists/*
+ RUN apt-get update -q && \
+ apt-get install -y curl=<version> gnupg2=<version> lsb-release=<version> && \
+ curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
+ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros.list > /dev/null && \
+ apt-get update -q && \
+ apt-get install -y ros-${ROS_DISTRO}-${INSTALL_PACKAGE}=<version> \
+ python3-rosinstall=<version> \
+ python3-rosinstall-generator=<version> \
+ python3-wstool=<version> \
+ python3-catkin-tools=<version> \
+ python3-osrf-pycommon=<version> \
+ python3-argcomplete=<version> \
+ python3-rosdep=<version> python3-vcstool=<version> && \
+ rosdep init && \
+ rm -rf /var_lib/apt/lists/*
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
RUN apt-get update -q && \ | |
apt-get install -y curl gnupg2 lsb-release && \ | |
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \ | |
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros.list > /dev/null && \ | |
apt-get update -q && \ | |
apt-get install -y ros-${ROS_DISTRO}-${INSTALL_PACKAGE} \ | |
python3-rosinstall \ | |
python3-rosinstall-generator \ | |
python3-wstool \ | |
python3-catkin-tools \ | |
python3-osrf-pycommon \ | |
python3-argcomplete \ | |
python3-rosdep python3-vcstool && \ | |
rosdep init && \ | |
rm -rf /var/lib/apt/lists/* | |
RUN apt-get update -q && \ | |
apt-get install -y curl=<version> gnupg2=<version> lsb-release=<version> && \ | |
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \ | |
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros.list > /dev/null && \ | |
apt-get update -q && \ | |
apt-get install -y ros-${ROS_DISTRO}-${INSTALL_PACKAGE}=<version> \ | |
python3-rosinstall=<version> \ | |
python3-rosinstall-generator=<version> \ | |
python3-wstool=<version> \ | |
python3-catkin-tools=<version> \ | |
python3-osrf-pycommon=<version> \ | |
python3-argcomplete=<version> \ | |
python3-rosdep=<version> python3-vcstool=<version> && \ | |
rosdep init && \ | |
rm -rf /var_lib/apt/lists/* |
Tools
Hadolint
[warning] 91-91: Either use Wget or Curl but not both (DL4001)
[info] 91-91: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[warning] 91-91: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check (DL4006)
[warning] 91-91: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
RUN DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:mozillateam/ppa -y && \ | ||
echo 'Package: *' > /etc/apt/preferences.d/mozilla-firefox && \ | ||
echo 'Pin: release o=LP-PPA-mozillateam' >> /etc/apt/preferences.d/mozilla-firefox && \ | ||
echo 'Pin-Priority: 1001' >> /etc/apt/preferences.d/mozilla-firefox && \ | ||
apt-get update -q && \ | ||
apt-get install -y --allow-downgrades \ | ||
firefox && \ | ||
apt-get autoclean && \ | ||
apt-get autoremove && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure all package versions are pinned to avoid potential incompatibilities.
- RUN DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:mozillateam/ppa -y && \
- echo 'Package: *' > /etc/apt/preferences.d/mozilla-firefox && \
- echo 'Pin: release o=LP-PPA-mozillateam' >> /etc/apt/preferences.d/mozilla-firefox && \
- echo 'Pin-Priority: 1001' >> /etc/apt/preferences.d/mozilla-firefox && \
- apt-get update -q && \
- apt-get install -y --allow-downgrades \
- firefox && \
- apt-get autoclean && \
- apt-get autoremove && \
- rm -rf /var/lib/apt/lists/*
+ RUN DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:mozillateam/ppa -y && \
+ echo 'Package: *' > /etc/apt/preferences.d/mozilla-firefox && \
+ echo 'Pin: release o=LP-PPA-mozillateam' >> /etc/apt/preferences.d/mozilla-firefox && \
+ echo 'Pin-Priority: 1001' >> /etc/apt/preferences.d/mozilla-firefox && \
+ apt-get update -q && \
+ apt-get install -y --allow-downgrades firefox=<version> && \
+ apt-get autoclean && \
+ apt-get autoremove && \
+ rm -rf /var_lib/apt/lists/*
Committable suggestion was skipped due to low confidence.
Tools
Hadolint
[info] 64-64: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[warning] 64-64: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
Summary by CodeRabbit
New Features
Documentation