• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3# Move docker's storage location to scratch disk so we don't run out of space.
4echo 'DOCKER_OPTS="${DOCKER_OPTS} --graph=/tmpfs/docker"' | sudo tee --append /etc/default/docker
5# Use container registry mirror for pulling docker images (should make downloads faster)
6# See https://cloud.google.com/container-registry/docs/using-dockerhub-mirroring
7echo 'DOCKER_OPTS="${DOCKER_OPTS} --registry-mirror=https://mirror.gcr.io"' | sudo tee --append /etc/default/docker
8sudo service docker restart
9
10# Download Docker images from DockerHub
11DOCKERHUB_ORGANIZATION=protobuftesting
12DOCKERFILE_DIR=kokoro/linux/dockerfile/release/ruby_rake_compiler
13DOCKERFILE_PREFIX=$(basename $DOCKERFILE_DIR)
14export RAKE_COMPILER_DOCK_IMAGE=${DOCKERHUB_ORGANIZATION}/${DOCKERFILE_PREFIX}_$(sha1sum $DOCKERFILE_DIR/Dockerfile | cut -f1 -d\ )
15
16# All artifacts come here
17mkdir artifacts
18export ARTIFACT_DIR=$(pwd)/artifacts
19