Blame Dockerfile

4438cc3
# This image is the base image for all s2i configurable container images.
f4adb64
FROM registry.fedoraproject.org/fedora:28
85f65ff
Mohan Boddu b8e0f1b
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 RELEASE=8 ARCH=x86_64
85f65ff
85f65ff
LABEL summary="$SUMMARY" \
85f65ff
      description="$DESCRIPTION" \
85f65ff
      io.k8s.description="$DESCRIPTION" \
85f65ff
      io.k8s.display-name="s2i core" \
85f65ff
      io.openshift.s2i.scripts-url=image:///usr/libexec/s2i \
85f65ff
      io.s2i.scripts-url=image:///usr/libexec/s2i \
85f65ff
      com.redhat.component="$NAME" \
85f65ff
      name="$FGC/$NAME" \
85f65ff
      version="$VERSION" \
85f65ff
      release="$RELEASE.$DISTTAG" \
85f65ff
      architecture="$ARCH" \
85f65ff
      usage="This image is supposed to be used as a base image for other images that support source-to-image" \
85f65ff
      maintainer="SoftwareCollections.org <sclorg@redhat.com>"
85f65ff
85f65ff
ENV \
85f65ff
    # DEPRECATED: Use above LABEL instead, because this will be removed in future versions.
85f65ff
    STI_SCRIPTS_URL=image:///usr/libexec/s2i \
85f65ff
    # Path to be used in other layers to place s2i scripts into
85f65ff
    STI_SCRIPTS_PATH=/usr/libexec/s2i \
85f65ff
    APP_ROOT=/opt/app-root \
85f65ff
    # The $HOME is not set by default, but some applications needs this variable
85f65ff
    HOME=/opt/app-root/src \
85f65ff
    PATH=/opt/app-root/src/bin:/opt/app-root/bin:$PATH
85f65ff
4438cc3
# This is the list of basic dependencies that all language container image can
85f65ff
# consume.
85f65ff
# Also setup the 'openshift' user that is used for the build execution and for the
85f65ff
# application runtime execution.
85f65ff
# TODO: Use better UID and GID values
85f65ff
RUN INSTALL_PKGS="bsdtar \
85f65ff
  findutils \
85f65ff
  gettext \
4438cc3
  groff \
85f65ff
  tar \
85f65ff
  unzip" && \
85f65ff
  mkdir -p ${HOME}/.pki/nssdb && \
85f65ff
  chown -R 1001:0 ${HOME}/.pki && \
85f65ff
  dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
85f65ff
  rpm -V $INSTALL_PKGS && \
85f65ff
  dnf clean all -y
85f65ff
85f65ff
# Copy extra files to the image.
85f65ff
COPY ./root/ /
85f65ff
85f65ff
# Directory with the sources is set as the working directory so all STI scripts
85f65ff
# can execute relative to this path.
85f65ff
WORKDIR ${HOME}
85f65ff
85f65ff
ENTRYPOINT ["container-entrypoint"]
85f65ff
CMD ["base-usage"]
85f65ff
85f65ff
# Reset permissions of modified directories and add default user
85f65ff
RUN rpm-file-permissions && \
85f65ff
  useradd -u 1001 -r -g 0 -d ${HOME} -s /sbin/nologin \
85f65ff
      -c "Default Application User" default && \
85f65ff
  chown -R 1001:0 ${APP_ROOT}