Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
ARG GO_VERSION=1.24-alpine
ARG ALPINE_VERSION=latest
ARG GO_VERSION=1.24
ARG GOARCH=amd64

# Build stage
FROM docker.io/library/golang:${GO_VERSION} AS builder
FROM registry.access.redhat.com/ubi10/go-toolset:${GO_VERSION} AS builder

WORKDIR /build

Expand All @@ -14,9 +13,9 @@ COPY src/ .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${GOARCH} go build -a -installsuffix cgo -o patternizer .

# Runtime stage
FROM docker.io/library/alpine:${ALPINE_VERSION}
FROM registry.access.redhat.com/ubi10/ubi-minimal:10.0

RUN apk --no-cache add git
RUN microdnf --disableplugin=subscription-manager install -y git

COPY --from=builder /build/patternizer /usr/local/bin/patternizer

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ docs: ## Generate Go documentation
check: lint-fmt lint-vet build test-unit ## Quick check (format, vet, build, unit tests)

.PHONY: all
all: clean deps lint build test local-container-build ## Run everything
all: clean deps lint build test podman-build ## Run everything

##@ Conatiner-related tasks
.PHONY: manifest
Expand All @@ -149,7 +149,7 @@ amd64: manifest podman-build-amd64 ## Build the container on amd64
arm64: manifest podman-build-arm64 ## Build the container on arm64

.PHONY: podman-build
podman-build: podman-build-amd64 podman-build-arm64 ## Build both amd64 and arm64
podman-build: manifest podman-build-amd64 podman-build-arm64 ## Build both amd64 and arm64

.PHONY: podman-build-amd64
podman-build-amd64: ## build the container in amd64
Expand Down