Lines Matching +full:is +full:- +full:docker
8 # http://www.apache.org/licenses/LICENSE-2.0
11 # distributed under the License is distributed on an "AS IS" BASIS,
16 # Builds selected testing docker images and pushes them to artifact registry.
21 set -ex
25 cd -
29 # CHECK_MODE: if set, the script will check that all the .current_version files are up-to-date (us…
30 # SKIP_UPLOAD: if set, script won't push docker images it built to artifact registry.
31 # TRANSFER_FROM_DOCKERHUB: if set, will attempt to grab docker images missing in artifact registry…
33 # How to configure docker before running this script for the first time:
34 # Configure docker:
35 # $ gcloud auth configure-docker us-docker.pkg.dev
39 # Various check that the environment is setup correctly.
43 # Check that docker is installed and sudoless docker works.
44 docker run --rm -it debian:11 bash -c 'echo "sudoless docker run works!"' || \
45 (echo "Error: docker not installed or sudoless docker doesn't work?" && exit 1)
48 # way of allowing them to build locally on x64 machine is to use
49 # qemu binfmt-misc hook that automatically runs arm64 binaries under
51 # Perform a check that "qemu-user-static" with binfmt-misc hook
52 # is installed, to give an early warning (otherwise building arm64 images won't work)
53 …docker run --rm -it arm64v8/debian:11 bash -c 'echo "able to run arm64 docker images with an emula…
54 … can't run arm64 images under an emulator. Have you run 'sudo apt-get install qemu-user-static'?" …
57 ARTIFACT_REGISTRY_PREFIX=us-docker.pkg.dev/grpc-testing/testing-images-public
65 third_party/rake-compiler-dock/*
74 for CURRENTVERSION_FILE in $(find tools/ third_party/rake-compiler-dock -name '*.current_version')
77 if [ ! -e "${DOCKERFILE_DIR}/Dockerfile" ]
79 …echo "Found that ${DOCKERFILE_DIR} has '.current_version' file but there is no corresponding Docke…
90 # contents of the docker image always changes the SHA (e.g. using "ADD file"
95 if [ ! -e "$DOCKERFILE_DIR/Dockerfile" ]; then
98 DOCKER_IMAGE_TAG=$(sha1sum $DOCKERFILE_DIR/Dockerfile | cut -f1 -d\ )
105 …# value obtained here corresponds to the "RepoDigests" from "docker image inspect", but without th…
106 …$(gcloud artifacts docker images describe "${ARTIFACT_REGISTRY_PREFIX}/${DOCKER_IMAGE_NAME}:${DOCK…
111 …echo "Docker image ${DOCKER_IMAGE_NAME} already exists in artifact registry at the right version (…
118 echo "Version file for ${DOCKER_IMAGE_NAME} is in sync with info from artifact registry."
124 …echo "CHECK FAILED: Version file ${DOCKERFILE_DIR}.current_version is not in sync with info from a…
129 …# update info on what we consider to be the current version of the docker image (which will be use…
131 …echo -n "${ARTIFACT_REGISTRY_PREFIX}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}@${DOCKER_IMAGE_DIGES…
138 echo "CHECK FAILED: Docker image ${DOCKER_IMAGE_NAME} not found in artifact registry."
144 echo "Skipped querying artifact registry (running in local-only mode)."
148 # it is out of date and we will need to rebuild the docker image locally.
153 # it means the locally-built image hasn't been pushed to artifact registry yet.
159 echo "Dockerfile for ${DOCKER_IMAGE_NAME} hasn't changed. Will skip 'docker build'."
172 …for ${DOCKER_IMAGE_NAME} has changed, but the ${DOCKERFILE_DIR}.current_version is not up to date."
179 echo "Running 'docker build' for ${DOCKER_IMAGE_NAME}"
181 …docker build -t ${ARTIFACT_REGISTRY_PREFIX}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG} ${DOCKERFILE_…
184 …# TRANSFER_FROM_DOCKERHUB is a temporary feature that pulls the corresponding image from dockerhub…
185 …# of building it from scratch locally. This should simplify the dockerhub -> artifact registry mig…
189 docker pull ${DOCKERHUB_ORGANIZATION}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}
191 …docker tag ${DOCKERHUB_ORGANIZATION}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG} ${ARTIFACT_REGISTRY_…
194 …# After building the docker image locally, we don't know the image's RepoDigest (which is distinct…
195 …rent_version file with the image tag (which will be enough for running tests under docker locally).
198 …echo -n "${ARTIFACT_REGISTRY_PREFIX}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}" >${DOCKERFILE_DIR}.…
202 docker push ${ARTIFACT_REGISTRY_PREFIX}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}
204 …# After successful push, the image's RepoDigest info will become available in "docker image inspec…
206 …KER_IMAGE_DIGEST_REMOTE=$(docker image inspect "${ARTIFACT_REGISTRY_PREFIX}/${DOCKER_IMAGE_NAME}:$…
207 …echo -n "${ARTIFACT_REGISTRY_PREFIX}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}@${DOCKER_IMAGE_DIGES…
213 # Check that dockerimage_current_versions.bzl is up to date.