Coder Social home page Coder Social logo

sti-base's Introduction

OpenShift base images

This repository contains Dockerfiles which serve as base images with all the essential libraries and tools needed for OpenShift language images, namely:

Installation and Usage

Choose either the CentOS7 or RHEL7 base image:

  • RHEL7 base image

To build a RHEL7 based image, you need to build it on properly subscribed RHEL machine.

$ git clone https://github.com/openshift/s2i-base.git
$ cd s2i-base
$ make build TARGET=rhel7
  • CentOS7 base image

This image is available on DockerHub. To download it run:

docker pull openshift/base-centos7

To build a Base image from scratch run:

$ git clone https://github.com/openshift/s2i-base.git
$ cd s2i-base
$ make build

Software Collections in S2I images

OpenShift S2I images use Software Collections packages to provide the latest versions of various language environments. The SCL packages are released more frequently than the RHEL or CentOS systems, which are unlikely to change for several years. We rely on RHEL and CentOS for base images, on the other hand, because those are stable, supported, and secure platforms.

Normally, SCL requires manual operation to enable the collection you want to use. This is burdensome and can be prone to error. The OpenShift S2I approach is to set Bash environment variables that serve to automatically enable the desired collection:

  • BASH_ENV: enables the collection for all non-interactive Bash sessions
  • ENV: enables the collection for all invocations of /bin/sh
  • PROMPT_COMMAND: enables the collection in interactive shell

Two examples:

  • If you specify BASH_ENV, then all your #!/bin/bash scripts do not need to call scl enable.
  • If you specify PROMPT_COMMAND, then on execution of the docker exec ... /bin/bash command, the collection will be automatically enabled.

Note: The language interpreter executables in the collection (e.g., ruby) are not directly in a directory named in the PATH environment variable. This means that you cannot do:

$ docker exec <cid> ... ruby

but must instead do:

$ docker exec <cid> ... /bin/bash -c ruby

The /bin/bash -c, along with the setting the appropriate environment variable, ensures the correct ruby executable is found and invoked.

sti-base's People

Contributors

bparees avatar jhadvig avatar mfojtik avatar hhorak avatar soltysh avatar mnagy avatar rhcarvalho avatar ewolinetz avatar sdodson avatar csrwng avatar dlbewley avatar eliskasl avatar stevekuznetsov avatar tnguyen-rh avatar humaton avatar gabemontero avatar mohammedzee1000 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.