-
Notifications
You must be signed in to change notification settings - Fork 32
ROX-33559: Migrate collector images from UBI-minimal to UBI-micro #3021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
895a2fb
13c20e2
24fab83
320bc59
7970f98
4f4b635
c9dec44
d1c346e
419e3a9
250d3c8
4f9dffe
5c70d69
2c0636d
1627414
36d1dc3
97aedf4
7c3148d
589a43a
885bf9a
003f5e8
bae7789
6100f0a
2c75d7c
f0118b4
55362c7
467032e
4aac0ca
3bb578c
c0b5266
33c7ae4
b72bece
99e49c9
4e10e93
277834c
d04295d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| FROM quay.io/centos/centos:stream10 | ||
|
|
||
| ARG COLLECTOR_VERSION | ||
|
|
||
| ENV COLLECTOR_HOST_ROOT=/host | ||
|
|
||
| LABEL name="collector" \ | ||
| vendor="StackRox" \ | ||
| maintainer="support@stackrox.com" \ | ||
| summary="Runtime data collection for the StackRox Kubernetes Security Platform" \ | ||
| description="This image supports runtime data collection in the StackRox Kubernetes Security Platform." \ | ||
| io.stackrox.collector.version="${COLLECTOR_VERSION}" | ||
|
|
||
| WORKDIR / | ||
|
|
||
| RUN dnf upgrade -y && \ | ||
| dnf install -y libasan libubsan libtsan elfutils-libelf | ||
|
|
||
| # Uncomment this line to enable generation of core for collector | ||
| # RUN echo '/core/core.%e.%p.%t' > /proc/sys/kernel/core_pattern | ||
|
|
||
| COPY container/THIRD_PARTY_NOTICES/ /THIRD_PARTY_NOTICES/ | ||
| COPY kernel-modules /kernel-modules | ||
| COPY container/bin/collector /usr/local/bin/ | ||
| COPY container/bin/self-checks /usr/local/bin/self-checks | ||
| COPY container/status-check.sh /usr/local/bin/status-check.sh | ||
|
|
||
| EXPOSE 8080 9090 | ||
|
|
||
| HEALTHCHECK \ | ||
| # health checks within the first 5s are not counted as failure | ||
| --start-period=5s \ | ||
| # perform health check every 5s | ||
| --interval=5s \ | ||
| # the command uses /ready API | ||
| CMD /usr/local/bin/status-check.sh | ||
|
|
||
| ENTRYPOINT ["collector"] |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,18 +79,27 @@ RUN ctest --no-tests=error -V --test-dir "${CMAKE_BUILD_DIR}" | |
| RUN strip -v --strip-unneeded "${CMAKE_BUILD_DIR}/collector/collector" | ||
|
|
||
|
|
||
| FROM registry.access.redhat.com/ubi9/ubi-minimal:latest@sha256:69f5c9886ecb19b23e88275a5cd904c47dd982dfa370fbbd0c356d7b1047ef68 | ||
|
|
||
| RUN microdnf -y install --nobest \ | ||
| tbb \ | ||
| c-ares \ | ||
| crypto-policies-scripts \ | ||
| elfutils-libelf && \ | ||
| # Enable post-quantum cryptography key exchange for TLS. | ||
| update-crypto-policies --set DEFAULT:PQ && \ | ||
|
Comment on lines
-89
to
-90
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was not supposed to be removed. 😩
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I probably overlooked it as a reviewer. |
||
| microdnf -y clean all && \ | ||
| rpm --verbose -e --nodeps $(rpm -qa 'curl' '*rpm*' '*dnf*' '*libsolv*' '*hawkey*' 'yum*' 'libyaml*' 'libarchive*') && \ | ||
| rm -rf /var/cache/dnf /var/cache/yum | ||
| FROM registry.access.redhat.com/ubi9/ubi-micro:latest@sha256:093a704be0eaef9bb52d9bc0219c67ee9db13c2e797da400ddb5d5ae6849fa10 AS ubi-micro-base | ||
|
|
||
| FROM registry.access.redhat.com/ubi9/ubi:latest@sha256:6ed9f6f637fe731d93ec60c065dbced79273f1e0b5f512951f2c0b0baedb16ad AS package_installer | ||
|
|
||
| COPY --from=ubi-micro-base / /out/ | ||
|
|
||
| # Install packages directly to /out/ using --installroot | ||
| # Note: --setopt=reposdir=/etc/yum.repos.d instructs dnf to use repo configurations pointing to RPMs | ||
| # prefetched by Hermeto/Cachi2, instead of installroot's default UBI repos. | ||
| RUN dnf install -y \ | ||
| --installroot=/out/ \ | ||
| --releasever=9 \ | ||
| --setopt=install_weak_deps=False \ | ||
| --setopt=reposdir=/etc/yum.repos.d \ | ||
| --nodocs \ | ||
| c-ares ca-certificates crypto-policies-scripts elfutils-libelf libcap-ng libcurl-minimal libstdc++ libuuid openssl tbb && \ | ||
|
msugakov marked this conversation as resolved.
|
||
| dnf clean all --installroot=/out/ && \ | ||
| rm -rf /out/var/cache/dnf /out/var/cache/yum | ||
|
|
||
|
|
||
| FROM ubi-micro-base | ||
|
|
||
| ARG COLLECTOR_TAG | ||
|
|
||
|
|
@@ -122,6 +131,8 @@ ARG CMAKE_BUILD_DIR | |
|
|
||
| ENV COLLECTOR_HOST_ROOT=/host | ||
|
|
||
| COPY --from=package_installer /out/ / | ||
|
|
||
|
janisz marked this conversation as resolved.
|
||
| COPY --from=builder ${CMAKE_BUILD_DIR}/collector/collector /usr/local/bin/ | ||
| COPY --from=builder ${CMAKE_BUILD_DIR}/collector/self-checks /usr/local/bin/ | ||
|
|
||
|
|
||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.