Files
open-cluster-management/Dockerfile
Jian Qiu 927a8b92ce Support multi arch image (#227)
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2022-04-07 04:51:30 -04:00

18 lines
451 B
Docker

FROM quay.io/bitnami/golang:1.17 AS builder
ARG OS=linux
ARG ARCH=amd64
WORKDIR /go/src/open-cluster-management.io/registration
COPY . .
ENV GO_PACKAGE open-cluster-management.io/registration
RUN GOOS=${OS} \
GOARCH=${ARCH} \
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/registration/registration /
USER ${USER_UID}