From 2df5d931c0e1a9b3d0f40e26a533e9ea13a4f4f8 Mon Sep 17 00:00:00 2001 From: kychen Date: Fri, 12 Apr 2024 15:49:37 +0800 Subject: [PATCH] chore: use mirror images to improve build speed. --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 16f88cad56956..083f4b6d73838 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# syntax=docker/dockerfile-upstream:master +# syntax=docker-mirrors.alauda.cn/docker/dockerfile-upstream:master ARG RUNC_VERSION=v1.1.12 ARG CONTAINERD_VERSION=v1.7.11 @@ -38,10 +38,10 @@ FROM ${ALPINE_IMAGE}:edge@sha256:2d01a16bab53a8405876cec4c27235d47455a7b72b75334 FROM alpine-$TARGETARCH AS alpinebase # xx is a helper for cross-compilation -FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx +FROM --platform=$BUILDPLATFORM docker-mirrors.alauda.cn/tonistiigi/xx:${XX_VERSION} AS xx # go base image -FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS golatest +FROM --platform=$BUILDPLATFORM docker-mirrors.alauda.cn/library/golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS golatest # git stage is used for checking out remote repository sources FROM --platform=$BUILDPLATFORM ${ALPINE_IMAGE}:${ALPINE_VERSION} AS git @@ -189,7 +189,7 @@ COPY --from=cni-plugins-export / / FROM scratch AS binaries-linux COPY --link --from=runc /usr/bin/runc /buildkit-runc # built from https://github.com/tonistiigi/binfmt/releases/tag/buildkit%2Fv7.1.0-30 -COPY --link --from=tonistiigi/binfmt:buildkit-v7.1.0-30@sha256:45dd57b4ba2f24e2354f71f1e4e51f073cb7a28fd848ce6f5f2a7701142a6bf0 / / +COPY --link --from=docker-mirrors.alauda.cn/tonistiigi/binfmt:buildkit-v7.1.0-30@sha256:45dd57b4ba2f24e2354f71f1e4e51f073cb7a28fd848ce6f5f2a7701142a6bf0 / / COPY --link --from=cni-plugins-export-squashed / / COPY --link --from=buildctl /usr/bin/buildctl / COPY --link --from=buildkitd /usr/bin/buildkitd /