GithubHelp home page GithubHelp logo

s2i-nginx's Introduction

Load iamges to the local registry

Log in to OpenShift

oc login -u developer -p developer

Log in to the minishift registry

docker login -u developer -p $(oc whoami -t) $(minishift openshift registry)

Log in to docker hub (hub.docker.com)

docker login

Pull the base image to the local registry

docker pull openshift/base-centos7

Creating a basic S2I builder image and application container

This repository, along with https://github.com/flannon/static-site, implements an example showing the full cycle of s2i deployment. To run the static site you can do the following,

 make
 oc new-app flannon/s2i-nginx~https://github.com/flannon/static-site --name mysite
 oc expose svc/mysite

Getting started

This assumes you have a version of OpenShift greater than 3.6 running and that you've logged in.

Makefile

Running make will create the builder image called flannon/s2i-nginx and deploy it to the OpenShift docker registry. When make finishes you can check the builder image,

docker images | grep flannon/s2i-nginx

Building the application image

The application image combines the builder image with the applications source code, which, in this case, is the static website at https://github.com/flannon/static-site.git. Running new-app against the builder image with the source repository

 oc new-app flannon/s2i-nginx~https://github.com/flannon/static-site --name mysite

will tart a container from the builder image; inject the contents of source repository into the build container according to the instructions in the assemble script; make the application image from the current state of the builder container; and finally start the application container, which presents all the resources assembled during the build processes.

Making the application available

In order to access the application you'll need to open it's service port,

 oc expose svc/static-site

Once you've exposed the port you can run

 oc status

to get the URL of the static site, or check the project folder in the OpenShift console.

s2i-nginx's People

Contributors

flannon avatar

Watchers

James Cloos 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.