mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-02-14 18:09:57 +00:00
19 lines
454 B
Docker
19 lines
454 B
Docker
FROM golang:1.20-bullseye AS builder
|
|
ARG OS=linux
|
|
ARG ARCH=amd64
|
|
WORKDIR /go/src/open-cluster-management.io/ocm
|
|
COPY . .
|
|
ENV GO_PACKAGE open-cluster-management.io/ocm
|
|
|
|
RUN GOOS=${OS} \
|
|
GOARCH=${ARCH} \
|
|
GO_BUILD_PACKAGES=./cmd/placement \
|
|
make build --warn-undefined-variables
|
|
|
|
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
|
|
ENV USER_UID=10001
|
|
|
|
COPY --from=builder /go/src/open-cluster-management.io/ocm/placement /
|
|
|
|
USER ${USER_UID}
|