Code Monkey home page Code Monkey logo

s2irun's Introduction

S2IRun

Gitpod ready-to-code License Go Report Card S2IRun release Docker Pulls

Source to image is a command toolkit and workflow for building reproducible container images from source code. S2IRun is the instance that executes the s2i build process, and can be containerized so that it can run in any container environment. S2IRun produces ready-to-run images by injecting source code into a container image and letting the container prepare that source code for execution.

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

Quick start

Prerequisites

Start

  1. Create your own fork of devops-java-sample, this is a web project with java8.

  2. Clone S2IRun repo to your machine

  3. Write a config file to set parameters used in build:

    {
      "builderImage": "kubesphere/java-8-centos7:v2.1.0",
      "pushAuthentication": {
        "username": "USERNAME_REPLACE",
        "password": "PASSWORD_REPLACE"
      },
      "imageName": "USERNAME_REPLACE/s2irun-sample",
      "tag": "USERNAME_REPLACE/s2irun-sample:tag",
      "builderPullPolicy": "if-not-present",
      "export": true,
      "sourceUrl": "https://github.com/GIT_USERNAME_REPLACE/devops-java-sample.git",	                                  
    }
  4. To build image in right, you'll need to set environment variables:

    export S2I_CONFIG_PATH=PATH/TO/config.json
  5. Run following command to start build.

    go run cmd/main.go --v=4 --logtostderr=true
    

    Process details:

    ​ 1. It will pull image that defind in filed builderImage.

    ​ 2. clone source code.

    ​ 3. start build process

    ​ 4. after build completed, it will push read-to-run image

  6. Finally, it will push image to your docker registry, please check it.

About more

s2irun's People

Contributors

alawnwong avatar linuxsuren avatar magicsong avatar shaowenchen avatar

Watchers

 avatar

Forkers

promaksss

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.