-
Notifications
You must be signed in to change notification settings - Fork 139
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
This pull request adds support for building and testing s2i-{base,core} in C10S #306
Conversation
[test] |
All tests passed :) |
Pull Request validationSuccess🟢 CI - All checks have passed Auto MergeSuccess🟢 Pull Request is not marked as draft and it's not blocked by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any issues with c10s, when comparing to c9s. However, there are some differences in the Dockerfiles when comparing Fedora and c10s and if the changes were introduced to make the Fedora Dockerfile working fine, we might need to go through the same troubles again with c10s later.
So, I think either c10s should adopt some changes from Fedora, or Fedora should adopt some changes from c10s, whatever is correct for each particular difference. For the reference, this is the current diff of Fedora and c10s Dockerfiles:
--- Dockerfile.f40 2024-02-16 13:14:17.445015743 +0100
+++ Dockerfile.c10s 2024-07-15 13:38:56.082301348 +0200
@@ -1,13 +1,10 @@
# This image is the base image for all s2i configurable container images.
-FROM quay.io/fedora/fedora:40
+FROM quay.io/centos/centos:stream10-development
ENV SUMMARY="Base image which allows using of source-to-image." \
DESCRIPTION="The s2i-core image provides any images layered on top of it \
with all the tools needed to use source-to-image functionality while keeping \
-the image size as small as possible." \
- NAME=s2i-core \
- VERSION=40 \
- ARCH=x86_64
+the image size as small as possible."
LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
@@ -15,10 +12,9 @@ LABEL summary="$SUMMARY" \
io.k8s.display-name="s2i core" \
io.openshift.s2i.scripts-url=image:///usr/libexec/s2i \
io.s2i.scripts-url=image:///usr/libexec/s2i \
- com.redhat.component="$NAME" \
- name="fedora/$NAME" \
- version="$VERSION" \
- usage="This image is supposed to be used as a base image for other images that support source-to-image" \
+ com.redhat.component="s2i-core-container" \
+ name="sclorg/s2i-core-c10s" \
+ version="1" \
maintainer="SoftwareCollections.org <sclorg@redhat.com>"
ENV \
@@ -29,34 +25,36 @@ ENV \
APP_ROOT=/opt/app-root \
# The $HOME is not set by default, but some applications needs this variable
HOME=/opt/app-root/src \
- PATH=/opt/app-root/src/bin:/opt/app-root/bin:$PATH \
- PLATFORM="fedora"
+ PATH=/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
+ PLATFORM="el10"
# This is the list of basic dependencies that all language container image can
# consume.
# Also setup the 'openshift' user that is used for the build execution and for the
# application runtime execution.
# TODO: Use better UID and GID values
+
RUN INSTALL_PKGS="bsdtar \
findutils \
- gettext \
- glibc-langpack-en \
groff-base \
+ glibc-locale-source \
+ glibc-langpack-en \
+ gettext \
rsync \
+ scl-utils \
tar \
- unzip" && \
+ unzip \
+ xz \
+ yum" && \
mkdir -p ${HOME}/.pki/nssdb && \
chown -R 1001:0 ${HOME}/.pki && \
- dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
+ yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
- dnf clean all -y
+ yum -y clean all --enablerepo='*'
# Copy extra files to the image.
COPY ./core/root/ /
-# Create a platform-python symlink if it does not exist already
-RUN [ -e /usr/libexec/platform-python ] || ln -s /usr/bin/python3 /usr/libexec/platform-python
-
# Directory with the sources is set as the working directory so all STI scripts
# can execute relative to this path.
WORKDIR ${HOME}
This should be fixed by 8998857 |
8998857
to
9e0ab10
Compare
|
9a8747a
to
03bb3ee
Compare
[test] |
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Update name in LABEL. Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
as suggested by @hhorak. Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
03bb3ee
to
65bc079
Compare
rebased against master [test] |
There are still differences that I don't understand why they should be there:
Base:
IOW, we install those packages in c10s, while not in F40:
I guess |
@hhorak Regarding redhat-rpm-config was added by request from here: sclorg/s2i-python-container#346 glibc-locale-source was added from the beginning of Dockerfile.rhel8 here: ceec37c and I guess this is not needed. |
Thanks for the analysis, I found only one mention of Since presence of a package might determine need for security fixes with a higher standard, I'd prefer not including packages if not necessary.
That means, I'd propose removing |
In case they are missing for some reason, we can add it later on. Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
It were removed by commit 5b77796 |
[test] |
CentOS 10 failures are expected. See https://issues.redhat.com/browse/TFT-2726. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see no further questions about packages installed in Fedora vs. c10s, all looks good to me now.
This pull request adds support for building and testing container in C10s.
The pull request is separated to commits for better review: