diff --git a/tools/internal_ci/helper_scripts/prepare_build_linux_rc b/tools/internal_ci/helper_scripts/prepare_build_linux_rc
index c8cb5a0c40fbc406c08a4cbf0f57835f852fee26..7f6e09340804baad6137fb0447e0f855af60030d 100644
--- a/tools/internal_ci/helper_scripts/prepare_build_linux_rc
+++ b/tools/internal_ci/helper_scripts/prepare_build_linux_rc
@@ -33,6 +33,10 @@
 # Need to increase open files limit for c tests
 ulimit -n 32768
 
+# Move docker's storage location to scratch disk so we don't run out of space.
+echo 'DOCKER_OPTS="${DOCKER_OPTS} --graph=/tmpfs/docker"' | sudo tee --append /etc/default/docker
+sudo service docker restart
+
 # Download Docker images from DockerHub
 export DOCKERHUB_ORGANIZATION=grpctesting