diff --git a/Dockerfile b/Dockerfile index 96c2369..c619f89 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,23 +10,24 @@ LABEL version "1.0.0" COPY deps/redir/redir.c /usr/src/redir.c # Installing required packages. -RUN apk update && \ - apk upgrade && \ - apk add --no-cache \ - alpine-sdk \ +RUN apt update --yes && \ + apt upgrade --yes && \ + apt install --yes \ + build-essential \ bash \ unzip \ wget \ - libvirt-daemon \ - dbus \ - polkit \ - virt-manager && \ + libvirt-daemon-system \ + libvirt-clients \ + bridge-utils && \ # Compile `redir`. gcc /usr/src/redir.c -o /usr/bin/redir && \ strip /usr/bin/redir && \ - # Cleanup APK. - apk del alpine-sdk && \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/cache/apk/* + # Cleanup APT. + apt remove build-essential --yes && \ + apt clean autoclean --yes && \ + apt autoremove --yes && \ + rm -rf /var/lib/{apt,dpkg,cache,log}/ # Arguments that can be overriden at build-time. ARG INSTALL_ANDROID_SDK=1 diff --git a/scripts/install-sdk.sh b/scripts/install-sdk.sh index f79ad4d..1d7be86 100644 --- a/scripts/install-sdk.sh +++ b/scripts/install-sdk.sh @@ -1,3 +1,7 @@ +#!/bin/bash + +set -e + # If the installation flag of the Android SDK is set # we download the Android command-line tools, # install the SDK, platform tools and the emulator. diff --git a/scripts/start-emulator.sh b/scripts/start-emulator.sh index 7a2dc8b..64cde38 100644 --- a/scripts/start-emulator.sh +++ b/scripts/start-emulator.sh @@ -31,16 +31,11 @@ wait_for_boot & # Start the emulator with no audio, no GUI, and no snapshots. echo "Starting the emulator ..." -if emulator \ +emulator \ -avd android \ -noaudio \ -no-boot-anim \ -no-window \ -no-snapshot-save \ -qemu \ - -enable-kvm; -then - update_state "stopped" -else - update_state "stopped" -fi + -enable-kvm || update_state "stopped"