Skip to content

Source-to-image

To create containerized applications in OpenShift Container Platform without manually configuring runtime environments, you can use Source-to-Image (S2I) images. S2I images are runtime base images for languages like Node.js, Python, and Java that you can insert your code into.

You can use the Red Hat Software Collections images as a foundation for applications that rely on specific runtime environments such as Node.js, Perl, or Python.

You can use the Introduction to source-to-image for OpenShift documentation as a reference for runtime environments that use Java.

S2I images are also available though the Cluster Samples Operator.

Accessing S2I builder images in the OpenShift Container Platform Developer Console

You can access S2I builder images through the Developer Console in the web console. You need these images to build containerized applications from your source code.

Procedure
  1. Log in to the OpenShift Container Platform web console using your login credentials. The default view for the OpenShift Container Platform web console is the Administrator perspective.

  2. Use the perspective switcher to switch to the Developer perspective.

  3. In the +Add view, use the Project drop-down list to select an existing project or create a new project.

  4. Click All services in the Developer Catalog tile.

  5. Click Builder Images under Type to see the available S2I images.

Source-to-image build process overview

Source-to-image (S2I) is a build process in OpenShift Container Platform that injects your source code into a container image. S2I automates the creation of ready-to-run container images from your application source code without manual configuration.

S2I performs the following steps:

  1. Runs the FROM <builder image> command

  2. Copies the source code to a defined location in the builder image

  3. Runs the assemble script in the builder image

  4. Sets the run script in the builder image as the default command

Buildah then creates the container image.