Files
open-cluster-management/Dockerfile
Wei Liu 3c49c03e88 update golang to 1.19 (#279)
Signed-off-by: Wei Liu <liuweixa@redhat.com>

Signed-off-by: Wei Liu <liuweixa@redhat.com>
2022-10-24 21:14:30 -04:00

18 lines
435 B
Docker

FROM golang:1.19 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}