Skip to content

Commit

Permalink
chore: upgrade docker and make integration-in-docker to use docker de…
Browse files Browse the repository at this point in the history
…pendencies from pr (#8596)

* chore: upgrade docker and make test-in-docker to use pr dependency

* chore: fix docker build commandE

* chore: fix docker build command
  • Loading branch information
ericzzzzzzz authored Mar 30, 2023
1 parent f412066 commit 109fe4e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,18 @@ build_deps:
deploy/skaffold
docker push gcr.io/$(GCP_PROJECT)/build_deps:$(DEPS_DIGEST)

skaffold-builder-ci:
docker build \
--cache-from gcr.io/$(GCP_PROJECT)/build_deps \
-f deploy/skaffold/Dockerfile.deps \
-t gcr.io/$(GCP_PROJECT)/build_deps \
.
time docker build \
-f deploy/skaffold/Dockerfile \
--target builder \
-t gcr.io/$(GCP_PROJECT)/skaffold-builder \
.

.PHONY: skaffold-builder
skaffold-builder:
time docker build \
Expand Down Expand Up @@ -272,7 +284,7 @@ integration-in-k3d: skaffold-builder
'

.PHONY: integration-in-docker
integration-in-docker: skaffold-builder
integration-in-docker: skaffold-builder-ci
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $(HOME)/.config/gcloud:/root/.config/gcloud \
Expand Down
4 changes: 3 additions & 1 deletion deploy/skaffold/Dockerfile.deps
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ RUN apt-get update && \
git python unzip && \
rm -rf /var/lib/apt/lists/*

COPY --from=docker:19.03.13 /usr/local/bin/docker /usr/local/bin/
COPY --from=docker:23.0.1 /usr/local/bin/docker /usr/local/bin/
# From Docker Engine version 23.0.0, Buildx is distributed in a separate package: docker-buildx-plugin. In earlier versions, Buildx was included in the docker-ce-cli package
COPY --from=docker/buildx-bin:0.10.4 /buildx /usr/libexec/docker/cli-plugins/docker-buildx
COPY --from=download-kubectl kubectl /usr/local/bin/
COPY --from=download-helm helm /usr/local/bin/
COPY --from=download-kustomize kustomize /usr/local/bin/
Expand Down

0 comments on commit 109fe4e

Please sign in to comment.