From 0255ee9793c2a5a753842a9e933c1191a138fe4c Mon Sep 17 00:00:00 2001 From: Lucy Phipps Date: Tue, 5 Oct 2021 16:40:30 +0100 Subject: [PATCH] fix Dockerfile and setup-ubuntu.sh --- scripts/Dockerfile | 3 ++- scripts/setup-ubuntu.sh | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/Dockerfile b/scripts/Dockerfile index 7f3849e43..08e57ccef 100644 --- a/scripts/Dockerfile +++ b/scripts/Dockerfile @@ -15,13 +15,14 @@ COPY ./setup-ubuntu.sh ./setup-android-sdk.sh ./properties.sh /tmp/ # Setup needed packages and the Android SDK and NDK: RUN apt-get update && \ apt-get -yq upgrade && \ - apt-get install -yq sudo && \ + apt-get install -yq sudo lsb-release software-properties-common && \ adduser --disabled-password --shell /bin/bash --gecos "" builder && \ echo "builder ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/builder && \ chmod 0440 /etc/sudoers.d/builder && \ su - builder -c /tmp/setup-ubuntu.sh && \ su - builder -c /tmp/setup-android-sdk.sh && \ # Removed unused parts to make a smaller Docker image: + apt-get remove -yq --autoremove lsb-release software-properties-common && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* && \ cd /home/builder/lib/android-ndk/ && \ diff --git a/scripts/setup-ubuntu.sh b/scripts/setup-ubuntu.sh index 731190069..5067e38e4 100755 --- a/scripts/setup-ubuntu.sh +++ b/scripts/setup-ubuntu.sh @@ -210,14 +210,13 @@ fi # Allow 32-bit packages. $SUDO dpkg --add-architecture i386 +$SUDO apt-get -yq update # Newer Python versions for host builds -if dpkg --compare-versions $(lsb_release -rs || echo 0) lt 21.04; then +if dpkg --compare-versions $(lsb_release -rs) lt 21.04; then $SUDO add-apt-repository -y ppa:deadsnakes/ppa fi -$SUDO apt-get -yq update - $SUDO DEBIAN_FRONTEND=noninteractive \ apt-get install -yq --no-install-recommends $PACKAGES