Move directories around

This commit is contained in:
2024-09-04 21:16:19 +01:00
parent 3b2cb3d689
commit 0e34ab7a27
14 changed files with 83 additions and 94 deletions
+2 -1
View File
@@ -2,6 +2,7 @@
FROM golang:1.22 AS builder
ARG TARGETOS
ARG TARGETARCH
ARG IMAGE_VERSION_TAG
WORKDIR /workspace
# Copy the Go Modules manifests
@@ -21,7 +22,7 @@ COPY internal/ internal/
# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -ldflags "-X shared.BACKUP_JOB_IMAGE=ghcr.io/lukaszraczylo/kubernetes-images-sync-worker:v${IMAGE_VERSION_TAG}" -a -o manager cmd/main.go
# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details