remkohdev
  • Learn to Code
  • About Me
  • CI/CD
    • DevOps101
      • Welcome
  • OpenShift
    • Setup OpenShift
      • Setup Minishift
    • Builds
      • Source-to-Image (S2I)
        • Setup S2I
        • Build, Run, Deploy from Source
      • Jenkins Pipeline
    • Jenkins as a Service
      • Setup Jenkins on Openshift
      • Create a Pipeline for Java Spring Boot
  • Istio
    • Setup Istio on IKS
      • Login to IKS
    • Setup Istio on Openshift 3.11
    • Traffic Shifts with a VirtualService
    • Telemetry of Metrics using Prometheus
    • Telemetry of Distributed Tracing using Jaeger
    • Security with Mutual TLS (mTLS)
  • Apache Kafka
    • Setup Apache Kafka on IBM Cloud
    • Setup Apache Kafka on OpenShift
    • Produce and Consume Streams with Kafka Console Tools
    • Produce and Consume Streams with Spring Boot
    • Using the Event Streams CLI
    • Kafka Admin API
  • API Connect
    • APIC CLI
      • Manage API Lifecycle with apic
    • Securing your API
      • Setup AppID
      • Setup API Connect
      • Optional: Add Node-RED Test Server
      • Add 3rd Party OAuth OIDC
        • Create a Custom AppID API
        • Add a Security Definition to your API
Powered by GitBook
On this page

Was this helpful?

  1. OpenShift
  2. Builds
  3. Source-to-Image (S2I)

Setup S2I

PreviousSource-to-Image (S2I)NextBuild, Run, Deploy from Source

Last updated 5 years ago

Was this helpful?

Installation

See also the [source-to-image README]() on Github.

Install using Homebrew:

$ brew install source-to-image

Install from source code:

  • Download the [latest release](),

  • Unzip the release for your platform, e.g. source-to-image-v1.1.14-874754de-darwin-amd64.tar.gz

  • and move the executable to the application directory,

$ cd source-to-image-v1.1.14-874754de-darwin-amd64
$ mkdir /usr/local/share/s2i
$ cp * /usr/local/share/s2i
  • Add the s2i directory to the path,

$ vi ~/.bash_profile

export S2I_HOME=/usr/local/share/s2i
export PATH=$S2I_HOME:$PATH

:wq
  • Restart the terminal to reload the ~/.bash_profile

$ s2i version
s2i v1.1.14
  • Try it,

$ mkdir -p ~/dev/src/projects/s2i-tests
$ cd ~/dev/src/projects/s2i-tests
$ s2i build https://github.com/sclorg/django-ex centos/python-35-centos7 hello-python
$ docker run -p 8080:8080 hello-python
$ open http://localhost:8080

https://github.com/openshift/source-to-image
https://github.com/openshift/source-to-image/releases/latest