File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed
Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 1- ARG BASE_IMAGE
2- ARG BUILDER_IMAGE
1+ ARG BASE_IMAGE=gcr.io/distroless/static:nonroot
2+ ARG BUILDER_IMAGE=golang:1.23.0
33
44# Build the manager binary
5- FROM ${BUILDER_IMAGE} as builder
6- ARG TARGETOS
7- ARG TARGETARCH
5+ FROM ${BUILDER_IMAGE} AS builder
6+ ARG TARGETOS=linux
7+ ARG TARGETARCH=amd64
88
99WORKDIR /workspace
1010# Copy the Go Modules manifests
@@ -25,7 +25,7 @@ COPY client-go/ client-go/
2525# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO
2626# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
2727# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
28- RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux } GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go
28+ RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go
2929
3030# Use distroless as minimal base image to package the manager binary
3131# Refer to https://github.com/GoogleContainerTools/distroless for more details
Original file line number Diff line number Diff line change 1- FROM python:3.10-alpine as builder
1+ FROM python:3.10-alpine AS builder
22
33WORKDIR /workspace
44
55COPY pyproject.toml poetry.lock ./
6- ENV POETRY_VIRTUALENVS_CREATE false
6+ ENV POETRY_VIRTUALENVS_CREATE= false
77
88RUN apk add --no-cache \
99 build-base \
Original file line number Diff line number Diff line change @@ -187,7 +187,6 @@ image-build:
187187 $(IMAGE_BUILD_CMD ) -t $(IMG ) \
188188 --build-arg BASE_IMAGE=$(BASE_IMAGE ) \
189189 --build-arg BUILDER_IMAGE=$(BUILDER_IMAGE ) \
190- --build-arg CGO_ENABLED=$(CGO_ENABLED ) \
191190 $(IMAGE_BUILD_EXTRA_OPTS ) ./
192191image-load : IMAGE_BUILD_EXTRA_OPTS=--load
193192image-load : image-build
You can’t perform that action at this time.
0 commit comments