Skip to content

Commit

Permalink
Internal Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 664773063
Change-Id: I6b5af62b3925e3f774de20833024e464a8d7483a
  • Loading branch information
GCP Buildpacks Team authored and copybara-github committed Aug 19, 2024
1 parent da526ed commit f5120ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 0 additions & 3 deletions internal/acceptance/acceptance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions kokoro/scripts/presubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f5120ba

Please sign in to comment.