-
Notifications
You must be signed in to change notification settings - Fork 100
/
Dockerfile.assisted-installer-controller-mce
51 lines (40 loc) · 2.03 KB
/
Dockerfile.assisted-installer-controller-mce
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/go-toolset:1.21 AS builder
ARG TARGETOS
ARG TARGETARCH
ENV COMPONENT_NAME=assisted-installer-controller
ENV COMPONENT_VERSION=1.0.0
ENV COMPONENT_TAG_EXTENSION=" "
ENV GOFLAGS="-p=4"
ENV GOEXPERIMENT=strictfipsruntime
ENV BUILD_TAGS="strictfipsruntime"
ENV USER_UID=1001 \
USER_NAME=assisted-installer
COPY --chown=${USER_UID} . /app
WORKDIR /app
RUN go install github.com/google/go-licenses@v1.6.0
RUN ${HOME}/go/bin/go-licenses save --save_path /tmp/licenses ./...
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -tags strictfipsruntime -o assisted-installer-controller src/main/assisted-installer-controller/assisted_installer_main.go
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/ubi:9.4
ARG release=main
ARG version=latest
RUN PKGS=$(if [ "$(uname -m)" == "s390x" ]; then echo -n 'tar gzip rsync' ; else echo -n 'tar gzip openshift-clients rsync'; fi) && \
subscription-manager refresh && dnf -y install $PKGS && dnf clean all
COPY --from=builder /tmp/licenses /licenses
COPY --from=builder /app/assisted-installer-controller /assisted-installer-controller
ENTRYPOINT ["/assisted-installer-controller"]
LABEL com.redhat.component="multicluster-engine-assisted-installer-controller-container" \
name="multicluster-engine/assisted-installer-controller-rhel9" \
version="${version}" \
upstream-ref="${version}" \
upstream-url="https://github.com/openshift/assisted-installer" \
summary="OpenShift Assisted Installer Controller" \
io.k8s.display-name="OpenShift Assisted Installer Controller" \
maintainer="Liat Gamliel <lgamliel@redhat.com>" \
description="OpenShift Assisted Installer Controller" \
io.k8s.description="OpenShift Assisted Installer Controller" \
distribution-scope="public" \
release="${release}" \
vendor="Red Hat, Inc." \
upstream_commit="${version}" \
org.label-schema.vcs-ref="${version}" \
org.label-schema.vcs-url="https://github.com/openshift/assisted-installer"