Refactor Dockerfiles (#6)

This commit is contained in:
Takashi Matsuo 2019-07-12 10:12:30 -07:00 committed by GitHub
parent aefb8c98b0
commit d6e90be651
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 109 additions and 85 deletions

View file

@ -23,6 +23,13 @@ fi
source "${PROJECT_ROOT}/ci/kokoro/define-docker-variables.sh"
cd "${PROJECT_ROOT}"
sudo docker build -t "${IMAGE}:tip" \
--build-arg DISTRO_VERSION="${DISTRO_VERSION}" \
-f "ci/kokoro/Dockerfile.${DISTRO}" ci
# If there's a version specific Dockerfile, we use it.
if [[ -f "ci/kokoro/Dockerfile.${DISTRO}-${DISTRO_VERSION}" ]]; then
sudo docker build -t "${IMAGE}:tip" \
-f "ci/kokoro/Dockerfile.${DISTRO}-${DISTRO_VERSION}" ci
else
sudo docker build -t "${IMAGE}:tip" \
--build-arg DISTRO_VERSION="${DISTRO_VERSION}" \
-f "ci/kokoro/Dockerfile.${DISTRO}" ci
fi