From a021f3f672e2ae277e17c24636a27327351f4cb1 Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Thu, 23 May 2024 13:30:20 +0900 Subject: [PATCH] feat(docker): minimize `base` stage (#16) * install ssh only and copy only once Signed-off-by: Yutaka Kondo * install gosu Signed-off-by: Yutaka Kondo * fix dir Signed-off-by: Yutaka Kondo * revert ansible Signed-off-by: Yutaka Kondo --------- Signed-off-by: Yutaka Kondo --- docker/autoware-openadk/Dockerfile | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/docker/autoware-openadk/Dockerfile b/docker/autoware-openadk/Dockerfile index e0c8bd51c9b..c7362e17069 100644 --- a/docker/autoware-openadk/Dockerfile +++ b/docker/autoware-openadk/Dockerfile @@ -5,22 +5,12 @@ FROM $BASE_IMAGE as base SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO -# Install apt packages +# Install apt packages and add GitHub to known hosts for private repositories RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \ - git \ - ssh \ - wget \ - cmake \ - curl \ gosu \ - gnupg \ - vim \ - unzip \ - lsb-release \ - && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache - -# Add GitHub to known hosts for private repositories -RUN mkdir -p ~/.ssh \ + ssh \ + && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache \ + && mkdir -p ~/.ssh \ && ssh-keyscan github.com >> ~/.ssh/known_hosts # Copy files