Files
open-cluster-management/Dockerfile
Jian Qiu bf410fc248 Upgrade golang to 1.18 (#74)
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2022-05-25 02:07:40 -04:00

17 lines
667 B
Docker

FROM golang:1.18 AS builder
WORKDIR /go/src/open-cluster-management.io/placement
COPY . .
ENV GO_PACKAGE open-cluster-management.io/placement
RUN make build --warn-undefined-variables
RUN make build-e2e --warn-undefined-variables
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
ENV USER_UID=10001
# If proxy is added here to resolve build issue, remove it in the codes (E.g., call os.Unsetenv at main.go),
# or the codes will use it and cause an error, the container cannot be started.
COPY --from=builder /go/src/open-cluster-management.io/placement/placement /
COPY --from=builder /go/src/open-cluster-management.io/placement/e2e.test /
USER ${USER_UID}