FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.9 AS builder
WORKDIR /go/src/github.com/aws/amazon-eks-pod-identity-webhook
COPY . .
ENV GO_PACKAGE github.com/aws/amazon-eks-pod-identity-webhook
RUN make amazon-eks-pod-identity-webhook

FROM registry.ci.openshift.org/ocp/4.9:base
COPY --from=builder /go/src/github.com/aws/amazon-eks-pod-identity-webhook/amazon-eks-pod-identity-webhook /usr/bin/aws-pod-identity-webhook
