Skip to content

Commit

Permalink
Dockerfile: remove init process
Browse files Browse the repository at this point in the history
Claircore no longer spawns external processes, so we can remove the
minimal init.

Signed-off-by: Hank Donnay <hdonnay@redhat.com>
  • Loading branch information
hdonnay committed Apr 6, 2023
1 parent 912c6e4 commit 497ab2d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,14 @@ RUN for cmd in clair clairctl; do\
-trimpath -ldflags="-s -w$(test -n "$CLAIR_VERSION" && printf " -X 'github.com/quay/clair/v4/cmd.Version=%s (user)'" "${CLAIR_VERSION}")" \
./cmd/$cmd; done

FROM registry.access.redhat.com/ubi8/ubi-minimal AS init
RUN microdnf install --disablerepo=* --enablerepo=ubi-8-baseos-rpms --enablerepo=ubi-8-appstream-rpms podman-catatonit

FROM registry.access.redhat.com/ubi8/ubi-minimal AS final
ENTRYPOINT ["/usr/local/bin/catatonit", "--", "/bin/clair"]
ENTRYPOINT ["/bin/clair"]
VOLUME /config
EXPOSE 6060
WORKDIR /run
ENV CLAIR_CONF=/config/config.yaml CLAIR_MODE=combo
ENV SSL_CERT_DIR="/etc/ssl/certs:/etc/pki/tls/certs:/var/run/certs"
USER nobody:nobody

COPY --from=init /usr/libexec/catatonit/catatonit /usr/local/bin/catatonit
COPY --from=build /build/clair /bin/clair
COPY --from=build /build/clairctl /bin/clairctl

0 comments on commit 497ab2d

Please sign in to comment.