☰ Menu
Home›DevOps & Cloud›source-to-image
CLI Open source 20 installs/mo

source-to-image for Mac

source-to-image

Source-to-Image (S2I) is a toolkit and workflow for building reproducible container images from source code.

source-to-image — overview

Source-To-Image (S2I)

Overview

Source-to-Image (S2I) is a toolkit and workflow for building reproducible container images from source code. S2I produces ready-to-run images by injecting source code into a container image and letting the container prepare that source code for execution. By creating self-assembling builder images, you can version and control your build environments exactly like you use container images to version your runtime environments.

For a deep dive on S2I you can view this presentation.

Want to try it right now? Download the latest release and run:

$ s2i build https://github.com/sclorg/django-ex centos/python-35-centos7 hello-python $ docker run -p 8080:8080 hello-python

Now browse to http://localhost:8080 to see the running application.

You've just built and run a new container image from source code in a git repository, no Dockerfile necessary.

How Source-to-Image works

For a dynamic language like Ruby, the build-time and run-time environments are typically the same. Starting with a builder image that describes this environment - with Ruby, Bundler, Rake, Apache, GCC, and other packages needed to set up and run a Ruby application installed - source-to-image performs the following steps: Start a container from the builder image with the application source injected into a known directory The container process transforms that source code into the appropriate runnable setup - in this case, by installing dependencies with Bundler and moving the source code into a directory where Apache has been preconfigured to look for the Ruby config.ru file. Commit the new container and set the image entrypoint to be a script (provided by the builder image) that will start Apache to host the Ruby application.

For compiled languages like C, C++, Go, or Java, the dependencies necessary for compilation might dramatically outweigh the size of the actual runtime artifacts. To keep runtime images slim, S2I enables a multiple-step build processes, where a binary artifact such as an executable or Java WAR file is created in the first builder image, extracted, and injected into a second runtime image that simply places the executable in the correct location for execution.

For example, to create a reproducible build pipeline for Tomcat (the popular Java webserver) and Maven: Create a builder image containing OpenJDK and Tomcat that expects to have a WAR file injected Create a second image that layers on top of the first image Maven and any other standard dependencies, and expects to have a Maven project injected Invoke source-to-image using the Java application source and the Maven image to create the desired application WAR Invoke source-to-image a second time using the WAR file from the previous step and the initial Tomcat image to create the runtime image

Details

用于构建源代码并注入到 Docker 镜像的工具

How to install source-to-image

  1. Open Terminal (press ⌘ + Space and type “Terminal”).
  2. If Homebrew is not installed yet, run the command below first.
  3. Run this command:

Latest 10 releases

Last updated 2026-09-22; current version v1.6.4, with the latest 10 releases listed.

VersionReleasedTypeSizemacOSWindowsLinux
v1.6.42026-09-22Stable5.9 MBDownloadDownloadDownload
v1.6.32026-07-23Stable5.9 MBDownloadDownloadDownload
v1.6.22026-06-04Stable5.9 MBDownloadDownloadDownload
v1.6.12026-03-11Stable11.4 MBDownloadDownloadDownload
v1.6.02026-03-11Stable11.4 MBDownloadDownloadDownload
v1.5.12025-06-03Stable5.8 MBDownloadDownloadDownload
v1.5.02025-01-13Stable————
v1.4.02024-05-09Stable5.5 MBDownloadDownloadDownload
v1.3.92023-10-18Stable5.4 MBDownloadDownloadDownload
v1.3.82023-07-06Stable5.3 MBDownloadDownloadDownload

Data from GitHub Releases; stable releases first, each group sorted newest first.

Prebuilt bottle platforms

Official Homebrew bottles cover:

  • Apple silicon · latest macOS
  • Apple silicon · macOS 26 Tahoe
  • Apple silicon · macOS 15 Sequoia
  • Linux · ARM64
  • Linux · x86_64

⚠️ No prebuilt bottle for Intel Macs; Intel users need brew install --build-from-source to build from source.

Compared with similar apps

Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.

Compared with similar apps
AppVersionLicenseArchitecture30-day installs
source-to-imagev1.6.4Apache-2.0CLI20
mintoolkit1.41.8Apache-2.0CLI23
docuumv0.27.3MITCLI26
whalebrew0.5.0Apache-2.0CLI17

Similar apps: DevOps & Cloud

Leave a comment

评论表单加载中…