Use podman for arm32v7 for containers

This commit is contained in:
Jean-Marc ANDRE 2020-12-01 21:29:49 +01:00
parent 30cdae0d32
commit 82277d70c0
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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