mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-05-21 16:43:48 +00:00
Signed-off-by: haoqing0110 <qhao@redhat.com> Signed-off-by: haoqing0110 <qhao@redhat.com>
17 lines
667 B
Docker
17 lines
667 B
Docker
FROM golang:1.19 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}
|