fix Dockerfile and setup-ubuntu.sh

This commit is contained in:
Lucy Phipps 2021-10-05 16:40:30 +01:00
parent f73a3fb45f
commit 0255ee9793
No known key found for this signature in database
GPG Key ID: 8F688A3DB7869BFE
2 changed files with 4 additions and 4 deletions

View File

@ -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/ && \

View File

@ -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