##############################################################################
# ref: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#use-multi-stage-builds
##############################################################################
# ref: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#use-multi-stage-builds
COPY pip-requirements.txt /wheels/requirements/pip-requirements.txt
RUN apk --no-cache add --update \
COPY pip-requirements.txt /wheels/requirements/pip-requirements.txt
RUN apk --no-cache add --update \
# Build binaries; detect the architecture automatically (default is amd64)
RUN git clone https://github.com/kubernetes/kubernetes /src/k8s.io/kubernetes
# Build binaries; detect the architecture automatically (default is amd64)
RUN git clone https://github.com/kubernetes/kubernetes /src/k8s.io/kubernetes
make WHAT=test/e2e/e2e.test ARCH=$HOST_ARCH
RUN git clone https://github.com/heptio/sonobuoy /go/src/github.com/heptio/sonobuoy && \
cd /go/src/github.com/heptio/sonobuoy && \
make WHAT=test/e2e/e2e.test ARCH=$HOST_ARCH
RUN git clone https://github.com/heptio/sonobuoy /go/src/github.com/heptio/sonobuoy && \
cd /go/src/github.com/heptio/sonobuoy && \
git checkout $SB_TAG && \
go install
RUN git clone https://gerrit.akraino.org/r/validation /opt/akraino/validation
git checkout $SB_TAG && \
go install
RUN git clone https://gerrit.akraino.org/r/validation /opt/akraino/validation
RUN pip3 wheel -r /wheels/requirements/pip-requirements.txt
# Copy binaries in the final container and install robot framework
RUN pip3 wheel -r /wheels/requirements/pip-requirements.txt
# Copy binaries in the final container and install robot framework
COPY --from=build /src/k8s.io/kubernetes/_output/bin /usr/local/bin
COPY --from=build /go/bin/sonobuoy /bin/sonobuoy
COPY --from=build /wheels /wheels
COPY --from=build /opt/akraino/validation/ /opt/akraino/validation/
COPY --from=build /src/k8s.io/kubernetes/_output/bin /usr/local/bin
COPY --from=build /go/bin/sonobuoy /bin/sonobuoy
COPY --from=build /wheels /wheels
COPY --from=build /opt/akraino/validation/ /opt/akraino/validation/