blob: 5bb051477b00c218a881d9dd6507621527f0c776 [file] [log] [blame]
# BASE_DISTRIBUTION is used to switch between the old base distribution and distroless base images
ARG BASE_DISTRIBUTION=debug
# Version is the base image version from the TLD Makefile
ARG BASE_VERSION=latest
# The following section is used as base image if BASE_DISTRIBUTION=debug
FROM gcr.io/istio-release/base:${BASE_VERSION} as debug
# The following section is used as base image if BASE_DISTRIBUTION=distroless
FROM gcr.io/istio-release/distroless:${BASE_VERSION} as distroless
# This will build the final image based on either debug or distroless from above
# hadolint ignore=DL3006
FROM ${BASE_DISTRIBUTION:-debug}
# install operator binary
ARG TARGETARCH
COPY ${TARGETARCH:-amd64}/operator /usr/local/bin/operator
# add operator manifests
COPY manifests/ /var/lib/istio/manifests/
USER 1337:1337
ENTRYPOINT ["/usr/local/bin/operator"]