From f5120ba9e0b529a03bd75b31734bb1edb63c5275 Mon Sep 17 00:00:00 2001 From: GCP Buildpacks Team Date: Mon, 19 Aug 2024 06:09:07 -0700 Subject: [PATCH] Internal Change PiperOrigin-RevId: 664773063 Change-Id: I6b5af62b3925e3f774de20833024e464a8d7483a --- internal/acceptance/acceptance.go | 3 --- kokoro/scripts/presubmit.sh | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/acceptance/acceptance.go b/internal/acceptance/acceptance.go index e0a41c8af..6ba9e5fba 100644 --- a/internal/acceptance/acceptance.go +++ b/internal/acceptance/acceptance.go @@ -1260,9 +1260,6 @@ func getHostAndPortForApp(t *testing.T, containerID, containerName string) (stri // therefore ports are not mapped at the build container's 'localhost'. return containerName, 8080 } - if v := os.Getenv("DOCKER_IP_UBUNTU"); v != "" { - return v, hostPort(t, containerID) - } // When supplying the publish parameter with no local port picked, docker will // choose a random port to map to the published port. In this case, it means // there will be a mapping from localhost:${RAND_PORT} -> container:8080. There is a diff --git a/kokoro/scripts/presubmit.sh b/kokoro/scripts/presubmit.sh index 8d0b3ccba..c80a3d2c2 100644 --- a/kokoro/scripts/presubmit.sh +++ b/kokoro/scripts/presubmit.sh @@ -24,9 +24,10 @@ set -euo pipefail if [[ -v KOKORO_ARTIFACTS_DIR ]]; then cd "${KOKORO_ARTIFACTS_DIR}/git/buildpacks" use_bazel.sh 5.4.0 - export DOCKER_IP_UBUNTU="$(/sbin/ip route|awk '/default/ { print $3 }')" - echo "DOCKER_IP_UBUNTU: ${DOCKER_IP_UBUNTU}" + # Move docker storage location to scratch disk so we don't run out of space. + echo 'DOCKER_OPTS="${DOCKER_OPTS} --data-root=/tmpfs/docker"' | sudo tee --append /etc/default/docker + sudo service docker restart else export KOKORO_ARTIFACTS_DIR="$(mktemp -d)" echo "Setting KOKORO_ARTIFACTS_DIR=$KOKORO_ARTIFACTS_DIR"