FROM openshift/golang-builder:rhel_8_golang_1.16 AS builder
ENV __doozer=update BUILD_RELEASE=202111151318.p0.g18d82a6.assembly.stream BUILD_VERSION=v4.9.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=9 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.9.0-202111151318.p0.g18d82a6.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=18d82a6 OS_GIT_VERSION=4.9.0-202111151318.p0.g18d82a6.assembly.stream-18d82a6 SOURCE_DATE_EPOCH=1632145363 SOURCE_GIT_COMMIT=18d82a6d75252dcaed8356777e4883d8a2c9732a SOURCE_GIT_TAG=v1.20.0-alpha.0-20-g18d82a6d SOURCE_GIT_URL=https://github.com/openshift/cloud-provider-aws 

WORKDIR /build
COPY . .
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=${GOOS} GOPROXY=${GOPROXY} go build \
	-ldflags="-w -s -X 'main.version=${VERSION}'" \
	-o=aws-cloud-controller-manager \
	cmd/aws-cloud-controller-manager/main.go

FROM openshift/ose-base:v4.9.0.20211115.131845
ENV __doozer=update BUILD_RELEASE=202111151318.p0.g18d82a6.assembly.stream BUILD_VERSION=v4.9.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=9 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.9.0-202111151318.p0.g18d82a6.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=18d82a6 OS_GIT_VERSION=4.9.0-202111151318.p0.g18d82a6.assembly.stream-18d82a6 SOURCE_DATE_EPOCH=1632145363 SOURCE_GIT_COMMIT=18d82a6d75252dcaed8356777e4883d8a2c9732a SOURCE_GIT_TAG=v1.20.0-alpha.0-20-g18d82a6d SOURCE_GIT_URL=https://github.com/openshift/cloud-provider-aws 


COPY --from=builder /build/aws-cloud-controller-manager /bin/aws-cloud-controller-manager

ENTRYPOINT [ "/bin/aws-cloud-controller-manager" ]

LABEL \
        description="AWS Cloud Controller Manager" \
        License="ASL 2.0" \
        io.k8s.description="This is a component of OpenShift Container Platform and provides AWS Cloud Controller Manager" \
        io.k8s.display-name="OpenShift AWS Cloud Controller Manager" \
        io.openshift.tags="openshift,cloud-controller-manager,aws" \
        vendor="Red Hat" \
        name="openshift/ose-aws-cloud-controller-manager" \
        com.redhat.component="ose-aws-cloud-controller-manager-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Cloud Compute" \
        io.openshift.maintainer.subcomponent="Cloud Controller Manager" \
        release="202111151318.p0.g18d82a6.assembly.stream" \
        io.openshift.build.commit.id="18d82a6d75252dcaed8356777e4883d8a2c9732a" \
        io.openshift.build.source-location="https://github.com/openshift/cloud-provider-aws" \
        io.openshift.build.commit.url="https://github.com/openshift/cloud-provider-aws/commit/18d82a6d75252dcaed8356777e4883d8a2c9732a" \
        version="v4.9.0"

