mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-02-14 18:09:57 +00:00
18 lines
443 B
Docker
18 lines
443 B
Docker
FROM golang:1.21-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/work \
|
|
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/work /
|
|
|
|
USER ${USER_UID} |