You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
docker-whoami/travis-build.sh

34 lines
1.3 KiB

#!/bin/bash
set -e
echo "Updating Docker engine to master"
service docker stop
sudo curl -L -o /usr/local/bin/docker-containerd https://master.dockerproject.org/linux/amd64/docker-containerd
sudo curl -L -o /usr/local/bin/docker-containerd-ctr https://master.dockerproject.org/linux/amd64/docker-containerd-ctr
sudo curl -L -o /usr/local/bin/docker-containerd-shim https://master.dockerproject.org/linux/amd64/docker-containerd-shim
sudo curl -L -o /usr/local/bin/dockerd https://master.dockerproject.org/linux/amd64/dockerd
sudo curl -L -o /usr/local/bin/docker-init https://master.dockerproject.org/linux/amd64/docker-init
sudo curl -L -o /usr/local/bin/docker-proxy https://master.dockerproject.org/linux/amd64/docker-proxy
sudo curl -L -o /usr/local/bin/docker-runc https://master.dockerproject.org/linux/amd64/docker-runc
sudo curl -L -o /usr/local/bin/docker https://master.dockerproject.org/linux/amd64/docker
service docker start
docker version
if [ "$ARCH" != "amd64" ]; then
# prepare qemu
docker run --rm --privileged multiarch/qemu-user-static:register --reset
if [ "$ARCH" == "arm64" ]; then
# prepare qemu binary
docker create --name register hypriot/qemu-register
docker cp register:qemu-aarch64 qemu-aarch64-static
fi
fi
if [ -d tmp ]; then
docker rm build
rm -rf tmp
fi
docker build -t whoami -f "Dockerfile.$ARCH" .