Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
phracek
3e7bf6403d Merge pull request #255 from sclorg/use_rhel86_compose
Use RHEL.8.6-Nightly as compose
2022-05-31 07:07:03 +00:00
Petr Kubat
2bf7367ff6 move to Fedora 34 base image 2021-03-04 15:52:15 +01:00
5 changed files with 153 additions and 6 deletions

View file

@ -1,12 +1,12 @@
# This image is the base image for all s2i configurable container images.
FROM registry.fedoraproject.org/fedora:rawhide
FROM quay.io/fedora/fedora:latest
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=0 \
VERSION=34 \
ARCH=x86_64
LABEL summary="$SUMMARY" \
@ -16,7 +16,7 @@ LABEL summary="$SUMMARY" \
io.openshift.s2i.scripts-url=image:///usr/libexec/s2i \
io.s2i.scripts-url=image:///usr/libexec/s2i \
com.redhat.component="$NAME" \
name="$FGC/$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" \
maintainer="SoftwareCollections.org <sclorg@redhat.com>"
@ -52,7 +52,7 @@ RUN INSTALL_PKGS="bsdtar \
dnf clean all -y
# Copy extra files to the image.
COPY ./root/ /
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

73
Dockerfile.c8s Normal file
View file

@ -0,0 +1,73 @@
# This image is the base image for all s2i configurable container images.
FROM quay.io/centos/centos:stream8
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."
LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
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="s2i-core-container" \
name="sclorg/s2i-core-c8s" \
version="1" \
maintainer="SoftwareCollections.org <sclorg@redhat.com>"
ENV \
# DEPRECATED: Use above LABEL instead, because this will be removed in future versions.
STI_SCRIPTS_URL=image:///usr/libexec/s2i \
# Path to be used in other layers to place s2i scripts into
STI_SCRIPTS_PATH=/usr/libexec/s2i \
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:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
PLATFORM="el8"
# Copy just prepare-yum-repositories that is needed for packages install step,
# other files might be added later so changing them does not cause packages
# to be installed again, which takes long time
# 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 \
groff-base \
glibc-locale-source \
glibc-langpack-en \
gettext \
rsync \
scl-utils \
tar \
unzip \
xz \
yum" && \
mkdir -p ${HOME}/.pki/nssdb && \
chown -R 1001:0 ${HOME}/.pki && \
yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
yum -y clean all --enablerepo='*'
# Copy extra files to the image.
COPY ./core/root/ /
# Directory with the sources is set as the working directory so all STI scripts
# can execute relative to this path.
WORKDIR ${HOME}
ENTRYPOINT ["container-entrypoint"]
CMD ["base-usage"]
# Reset permissions of modified directories and add default user
RUN rpm-file-permissions && \
useradd -u 1001 -r -g 0 -d ${HOME} -s /sbin/nologin \
-c "Default Application User" default && \
chown -R 1001:0 ${APP_ROOT}

73
Dockerfile.c9s Normal file
View file

@ -0,0 +1,73 @@
# This image is the base image for all s2i configurable container images.
FROM quay.io/centos/centos:stream9
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."
LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
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="s2i-core-container" \
name="sclorg/s2i-core" \
version="1" \
maintainer="SoftwareCollections.org <sclorg@redhat.com>"
ENV \
# DEPRECATED: Use above LABEL instead, because this will be removed in future versions.
STI_SCRIPTS_URL=image:///usr/libexec/s2i \
# Path to be used in other layers to place s2i scripts into
STI_SCRIPTS_PATH=/usr/libexec/s2i \
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:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
PLATFORM="el9"
# Copy just prepare-yum-repositories that is needed for packages install step,
# other files might be added later so changing them does not cause packages
# to be installed again, which takes long time
# 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 \
groff-base \
glibc-locale-source \
glibc-langpack-en \
gettext \
rsync \
scl-utils \
tar \
unzip \
xz \
yum" && \
mkdir -p ${HOME}/.pki/nssdb && \
chown -R 1001:0 ${HOME}/.pki && \
yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
yum -y clean all --enablerepo='*'
# Copy extra files to the image.
COPY ./core/root/ /
# Directory with the sources is set as the working directory so all STI scripts
# can execute relative to this path.
WORKDIR ${HOME}
ENTRYPOINT ["container-entrypoint"]
CMD ["base-usage"]
# Reset permissions of modified directories and add default user
RUN rpm-file-permissions && \
useradd -u 1001 -r -g 0 -d ${HOME} -s /sbin/nologin \
-c "Default Application User" default && \
chown -R 1001:0 ${APP_ROOT}

View file

@ -84,4 +84,5 @@ See also
Dockerfile and other sources are available on https://github.com/sclorg/s2i-base-container.
In that repository you also can find another variants of S2I Base Dockerfiles.
The Dockerfile for CentOS is called Dockerfile, the Dockerfile for RHEL7 is called Dockerfile.rhel7,
the Dockerfile for RHEL8 is called Dockerfile.rhel8 and the Dockerfile for Fedora is Dockerfile.fedora.
the Dockerfile for RHEL8 is called Dockerfile.rhel8, the Dockerfile for CentOS Stream 8 is called Dockerfile.c8s,
the Dockerfile for CentOS Stream 9 is called Dockerfile.c9s and the Dockerfile for Fedora is Dockerfile.fedora.

View file

@ -1,7 +1,7 @@
#!/bin/sh -e
cat <<EOF
This image serves as the base image for all OpenShift v3 S2I builder images.
This image serves as the base image for all OpenShift S2I builder images.
It provides all essential libraries and development tools needed to
successfully build and run an application.