Skip to content

Commit

Permalink
avoid using dockerHub for base images
Browse files Browse the repository at this point in the history
  • Loading branch information
jwtty committed Jul 4, 2024
1 parent c8a70f5 commit 3770d95
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pipeline/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
set -euo pipefail
mv $(pwd)/azure.json $(pwd)/config/azureconfig/azure.json
echo EXCEPTION_CIDRS=${POD_CIDR}","${SERVICE_CIDR} > $(pwd)/config/environment_variables/environment.env
IMAGE_REGISTRY=$(registry.url) make install
IMAGE_REGISTRY=$(registry.url) E2E_PIPELINE=true make install
kubectl wait --for=condition=ready pod -A -l app=kube-egress-gateway --timeout=300s
kubectl get all -n kube-egress-gateway-system
displayName: build and install kube-egress-gateway components
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,13 @@ docker-build: docker-builder-setup ## Build docker image with the manager.

.PHONY: docker-build-multi-arch
docker-build-multi-arch: docker-builder-setup ## Build docker image with the manager.
TAG=$(IMAGE_TAG) IMAGE_REGISTRY=$(IMAGE_REGISTRY) PLATFORMS=$(PLATFORMS_MULTI_ARCH) docker buildx bake -f docker/docker-bake.hcl -f docker/docker-localtag-bake.hcl --progress auto --set=*.output=type=$(OUTPUT_TYPE)
TAG=$(IMAGE_TAG) IMAGE_REGISTRY=$(IMAGE_REGISTRY) PLATFORMS=$(PLATFORMS_MULTI_ARCH) docker buildx bake -f docker/docker-bake.hcl -f docker/docker-localtag-bake.hcl --progress auto --set=*.output=type=$(OUTPUT_TYPE)

.PHONY: docker-builder-setup
docker-builder-setup:
ifndef E2E_PIPELINE
docker run --privileged --rm tonistiigi/binfmt --install all
endif

##@ Deployment

Expand Down
2 changes: 1 addition & 1 deletion docker/base.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
# Build the manager binary
FROM --platform=$BUILDPLATFORM golang:1.22 as builder
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.22.5 as builder
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
Expand Down
2 changes: 1 addition & 1 deletion docker/cni.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM alpine
FROM mcr.microsoft.com/mirror/docker/library/alpine:3.16
COPY --from=baseimg /kube* /
USER 0:0
ENTRYPOINT cp /kube* /opt/cni/bin/

0 comments on commit 3770d95

Please sign in to comment.