Pre-install more stuff in the image.

Install bc and jq in the image rather than on every build.
Also pre-pull some Docker images
This commit is contained in:
Bryan Boreham committed 2016-10-31 17:33:33 +00:00
1 parent dfadb8f189
commit d1d53ba45c
2 files changed
+6 -4

No files matched your search

-3
View File
@@ -2,9 +2,6 @@
set -e
# We need jq to analyse the PR files JSON, so install that first
sudo apt-get -q update && sudo apt-get -q install bc jq
echo "TEST_AND_PUBLISH=1" > "$STATE"
if [ -n "$CI_PULL_REQUEST" -a "$CI_PULL_REQUEST" = "$CI_PULL_REQUESTS" ] ; then
+6 -1
View File
@@ -76,13 +76,18 @@ curl -sSL https://get.docker.com/gpg | sudo apt-key add -
curl -sSL https://get.docker.com/ | sed -e s/docker-engine/docker-engine=1.11.2-0~xenial/ | sh
apt-get update -qq;
apt-get install -q -y --force-yes --no-install-recommends ethtool;
apt-get install -q -y bc jq;
usermod -a -G docker vagrant;
echo 'DOCKER_OPTS="-H unix:///var/run/docker.sock -H unix:///var/run/alt-docker.sock -H tcp://0.0.0.0:2375 -s overlay"' >> /etc/default/docker;
service docker restart
EOF
# It seems we need a short delay for docker to start up, so I put this in
# a separate ssh connection. This installs nsenter.
ssh -t $name sudo docker run --rm -v /usr/local/bin:/target jpetazzo/nsenter
ssh -t $name sudo bash -x -s <<EOF
docker run --rm -v /usr/local/bin:/target jpetazzo/nsenter
docker pull alpine
docker pull aanand/docker-dnsutils
EOF
}
function copy_hosts {