#!/bin/bash

# Add any logic that is common to both the peer and docker environments here

apt-get update -qq

# Used by CHAINTOOL
apt-get install -y default-jre

#!/bin/bash

# Add any logic that is common to both the peer and docker environments here

# Use the mirror protocol for apt so that geographically close mirrors are automatically chosen
source /etc/lsb-release

cat <<EOF > /etc/apt/sources.list
deb mirror://mirrors.ubuntu.com/mirrors.txt $DISTRIB_CODENAME main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt $DISTRIB_CODENAME-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt $DISTRIB_CODENAME-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt $DISTRIB_CODENAME-security main restricted universe multiverse
EOF

apt-get update -qq

# Used by CHAINTOOL
apt-get install -y default-jre

Change APT to use mirror protocol
Change APT to use mirror protocol

As part of the setup script, set APT to use the mirror protocol so
that no matter where you are in the world, the closest mirror to you
will be chosen. If you don't reside in the US it can be slow to
download all the packages when building images. This will mean the
best mirrors will be chosen regardless of the developer's location.

Change-Id: Iadda26f38aad8526219da2e4ef0fd66150004829
Signed-off-by: Julian Carrivick <689bb502006712bd9777fa7f2dbac6f1e92d8c51@au1.ibm.com>
