代码拉取完成,页面将自动刷新
FROM registry.access.redhat.com/ubi8/ubi:8.3 as anchore-cli-builder
######## This is stage1 where anchore wheels, binary deps, and any items from the source tree get staged to /build_output ########
ENV LANG=en_US.UTF-8 LC_ALL=C.UTF-8
COPY . /buildsource
WORKDIR /buildsource
RUN set -ex && \
mkdir -p /build_output /build_output/deps /build_output/configs /build_output/wheels
RUN set -ex && \
echo "installing OS dependencies" && \
yum update -y && \
yum install -y gcc make python38 python38-wheel
# create anchore binaries
RUN set -ex && \
echo "installing anchore" && \
pip3 wheel --wheel-dir=/build_output/wheels . && \
cp ./LICENSE /build_output/ && \
cp ./docker-entrypoint.sh /build_output/configs/docker-entrypoint.sh
RUN tar -z -c -v -C /build_output -f /anchore-buildblob.tgz .
FROM registry.access.redhat.com/ubi8/ubi:8.3 as anchore-cli-final
ARG CLI_COMMIT
ARG ANCHORE_CLI_VERSION="0.9.1"
ARG ANCHORE_CLI_RELEASE="r0"
# Copy artifacts from build step
COPY --from=anchore-cli-builder /build_output /build_output
# Container metadata section
MAINTAINER dev@anchore.com
LABEL anchore_cli_commit=$CLI_COMMIT \
source="https://github.com/anchore/anchore-cli" \
name="anchore-cli" \
maintainer="dev@anchore.com" \
vendor="Anchore Inc." \
version=$ANCHORE_CLI_VERSION \
release=$ANCHORE_CLI_RELEASE \
summary="Anchore Engine CLI - python client for use against the anchore-engine container image scanning service, for policy-based security, best-practice and compliance enforcement." \
description="Anchore is an open platform for container security and compliance that allows developers, operations, and security teams to discover, analyze, and certify container images on-premises or in the cloud. The Anchore CLI is a python client that can be used to access and manager Anchore Engine - the on-prem, OSS, API accessible service that allows ops and developers to perform detailed analysis, run queries, produce reports and define policies on container images that can be used in CI/CD pipelines to ensure that only containers that meet your organization’s requirements are deployed into production."
# Default values that should be overridden in most cases on each container exec
ENV ANCHORE_CLI_USER=admin
ENV ANCHORE_CLI_PASS=foobar
ENV ANCHORE_CLI_URL=http://localhost:8228/v1/
ENV LANG=en_US.UTF-8
ENV LC_ALL=C.UTF-8
# Build dependencies
RUN yum update -y && \
yum install -y python38 python38-wheel
# Setup container default configs and directories
WORKDIR /anchore-cli
# Perform OS setup
RUN set -ex && \
groupadd --gid 1000 anchore && \
useradd --uid 1000 --gid anchore --shell /bin/bash --create-home anchore && \
mkdir -p /licenses/ && \
cp /build_output/LICENSE /licenses/ && \
cp /build_output/configs/docker-entrypoint.sh /docker-entrypoint.sh
# Perform any base OS specific setup
# Perform the anchore-cli build and install
RUN set -ex && \
pip3 install --no-index --find-links=./ /build_output/wheels/*.whl && \
rm -rf /build_output /root/.cache
USER anchore:anchore
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["/bin/bash"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。