Use https:// URLs in the APT configuration.
Drop --no-install-recommends, the image generation template disables
installation of recommended packages in /etc/apt/apt.conf.
Run apt-get autoremove at the end, cleaning up packages which were
installed to satisfy dependencies but are no longer needed.
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
set -o xtrace
############### Install packages for building
-apt-get update
apt-get -y install ca-certificates
-apt-get -y install --no-install-recommends \
+sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
+apt-get update
+apt-get -y install \
bc \
bison \
bzip2 \
gcc \
git \
ninja-build
+
+apt-get autoremove -y --purge