Use podman for arm32v7 for containers
This commit is contained in:
parent
30cdae0d32
commit
82277d70c0
@ -1,5 +1,5 @@
|
|||||||
# Build the manager binary
|
# Build the manager binary
|
||||||
FROM golang:1.13 as builder
|
FROM arm32v7/golang:alpine as builder
|
||||||
|
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
# Copy the Go Modules manifests
|
# Copy the Go Modules manifests
|
||||||
@ -15,7 +15,7 @@ COPY api/ api/
|
|||||||
COPY controllers/ controllers/
|
COPY controllers/ controllers/
|
||||||
|
|
||||||
# Build
|
# 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
|
# Use distroless as minimal base image to package the manager binary
|
||||||
# Refer to https://github.com/GoogleContainerTools/distroless for more details
|
# Refer to https://github.com/GoogleContainerTools/distroless for more details
|
||||||
|
|||||||
6
Makefile
6
Makefile
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
# Image URL to use all building/pushing image targets
|
# 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)
|
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
|
||||||
CRD_OPTIONS ?= "crd:trivialVersions=true"
|
CRD_OPTIONS ?= "crd:trivialVersions=true"
|
||||||
|
|
||||||
@ -56,11 +56,11 @@ generate: controller-gen
|
|||||||
|
|
||||||
# Build the docker image
|
# Build the docker image
|
||||||
docker-build: test
|
docker-build: test
|
||||||
docker build . -t ${IMG}
|
podman build --disable-compression --format=docker . -t ${IMG}
|
||||||
|
|
||||||
# Push the docker image
|
# Push the docker image
|
||||||
docker-push:
|
docker-push:
|
||||||
docker push ${IMG}
|
podman push ${IMG}
|
||||||
|
|
||||||
# find or download controller-gen
|
# find or download controller-gen
|
||||||
# download controller-gen if necessary
|
# download controller-gen if necessary
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user