×

Source-to-Image (S2I) images are special versions of runtime base images for languages like Node.js, Python, and Java. You can insert your code into S2I images to create containerized applications without configuring the runtime environment.

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 OKD 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 OKD web console using your login credentials. The default view for the OKD 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 that injects your source code into a container image. S2I automates the creation of ready-to-run container images from your application source code. It 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.