From 82277d70c0abd41042e4ad1f23b6c061d69c732e Mon Sep 17 00:00:00 2001 From: Jean-Marc ANDRE Date: Tue, 1 Dec 2020 21:29:49 +0100 Subject: [PATCH] Use podman for arm32v7 for containers --- Dockerfile | 4 ++-- Makefile | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 74eb9d7..88317e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.13 as builder +FROM arm32v7/golang:alpine as builder WORKDIR /workspace # Copy the Go Modules manifests @@ -15,7 +15,7 @@ COPY api/ api/ COPY controllers/ controllers/ # Build -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm GO111MODULE=on go build -a -o manager main.go # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details diff --git a/Makefile b/Makefile index 5da22b5..350856b 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Image URL to use all building/pushing image targets -IMG ?= controller:latest +IMG ?= desmo999r/formolcontroller:latest # Produce CRDs that work back to Kubernetes 1.11 (no version conversion) CRD_OPTIONS ?= "crd:trivialVersions=true" @@ -56,11 +56,11 @@ generate: controller-gen # Build the docker image docker-build: test - docker build . -t ${IMG} + podman build --disable-compression --format=docker . -t ${IMG} # Push the docker image docker-push: - docker push ${IMG} + podman push ${IMG} # find or download controller-gen # download controller-gen if necessary