From 98150897d303f2382f74d5de85535058f1834937 Mon Sep 17 00:00:00 2001 From: John Turco <101477820+JohnVTurco@users.noreply.github.com> Date: Mon, 10 Jun 2024 23:50:23 -0400 Subject: [PATCH] Made DEBIAN_FRONTEND less permanent (#87) * Made ENV DEBIAN_FRONTEND less permanent (I think) * made a change to fix building base images * Build base images fix * debian frontend changes --------- Co-authored-by: Eddy Zhou --- .github/workflows/build_base_images.yml | 4 +++- docker/base/inject_wato_base.Dockerfile | 11 +++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_base_images.yml b/.github/workflows/build_base_images.yml index 094357d0..ac08006d 100644 --- a/.github/workflows/build_base_images.yml +++ b/.github/workflows/build_base_images.yml @@ -17,7 +17,9 @@ jobs: uses: actions/checkout@v4 - name: Setup Watod Environment - run: ./watod_scripts/watod-setup-env.sh + run: | + MODULES_DIR="$GITHUB_WORKSPACE/modules" + . ./watod_scripts/watod-setup-env.sh shell: bash - name: Generate Docker Environment diff --git a/docker/base/inject_wato_base.Dockerfile b/docker/base/inject_wato_base.Dockerfile index 118bf5b5..61c0d89f 100644 --- a/docker/base/inject_wato_base.Dockerfile +++ b/docker/base/inject_wato_base.Dockerfile @@ -5,12 +5,15 @@ ARG GENERIC_IMAGE # for the wato_monorepo. FROM ${GENERIC_IMAGE} as wato_base -ENV DEBIAN_FRONTEND noninteractive +RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ + apt-get install -y curl sudo && \ + rm -rf /var/lib/apt/lists/* + ENV USER="bolty" ENV AMENT_WS=/home/${USER}/ament_ws # User Setup -RUN apt-get update && apt-get install -y curl sudo && \ +RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y curl sudo && \ rm -rf /var/lib/apt/lists/* # Add a user so that created files in the docker container are owned by a non-root user (for prod) @@ -19,14 +22,14 @@ RUN addgroup --gid 1000 ${USER} && \ useradd -rm -d /home/${USER} -s /bin/bash -g ${USER} -G sudo -u 1000 ${USER} -p "$(openssl passwd -6 $USER_PASSWD)" # install apt-fast -RUN apt-get -qq update && \ +RUN DEBIAN_FRONTEND=noninteractive apt-get -qq update && \ apt-get install -qq -y wget && \ mkdir -p /etc/apt/keyrings && \ wget -O - "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA2166B8DE8BDC3367D1901C11EE2FF37CA8DA16B" \ | gpg --dearmor -o /etc/apt/keyrings/apt-fast.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/apt-fast.gpg] \ http://ppa.launchpad.net/apt-fast/stable/ubuntu focal main" > /etc/apt/sources.list.d/apt-fast.list && \ - apt-get update -qq && apt-get install -qq -y apt-fast && \ + DEBIAN_FRONTEND=noninteractive apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y apt-fast && \ echo debconf apt-fast/maxdownloads string 16 | debconf-set-selections && \ echo debconf apt-fast/dlflag boolean true | debconf-set-selections && \ echo debconf apt-fast/aptmanager string apt-get | debconf-set-selections