Git Product home page Git Product logo

s2i-go's Introduction

DEPRECATED REPOSITORY

Go Docker images

Build Status

This repository contains the source for creating a source-to-image builder image, which be used to create reproducible Docker images from your Go project’s source code. The resulting image can be run using Docker.

For more information about using these images with OpenShift, please see the official OpenShift Documentation.

Versions

Go versions currently supported are:

  • Go 1.4.3

  • Go 1.5.3

  • Go 1.6

The following operating system base images are supported:

  • CentOS 7

Installation

To build a Go builder image, execute:

$ git clone https://github.com/openshift-s2i/s2i-go.git
$ cd s2i-go
$ make build VERSION=1.4

Alternatively, you can pull the CentOS image from Docker Hub via:

$ docker pull openshift/go-14-centos7

Notice: By omitting the VERSION parameter, the build/test action will be performed on all the supported versions of Go.

Usage

There are several sample Go applications included with this repository. To build a simple Go test application using the standalone

$ s2i build https://github.com/openshift-s2i/s2i-go.git \
    --context-dir=1.4/test/test-app openshift/go-14-centos7 go-test-app

The resulting image can be executed using docker:

$ docker run --rm -p 8080:8080 go-test-app

Once the container is running, it should be accessible using:

$ curl 127.0.0.1:8080

Test

This repository also provides a test suite to check functionality of simple Go applications built on top of the s2i-go image. It can be executed simply by running the make test command:

$ cd s2i-go
$ make test VERSION=1.4

Notice: By omitting the VERSION parameter, the build/test action will be performed on all the supported versions of Go.

Repository organization

  • <go-version>: Dockerfile to build container images from.

    • <go-version>/test/test-app: Sample Go application used for tests.

  • hack/: Folder containing scripts which are responsible for the build and test actions performed by the Makefile.

  • s2i/: Build scripts which will be injected into the builder image and executed during application source code builds.

Image name structure

Structure: openshift/1-2-3

  1. Platform name (lowercase) - go

  2. Platform version(without dots) - 14

  3. Base builder image - centos7/rhel7

Examples: openshift/go-14-centos7, openshift/go-14-rhel7

Contributing

Contributions to this project (in the form of bug reports, patches, or pull requests) are gratefully accepted by the maintainer.

Copyright 2016 by Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this package except in compliance with the License (see the LICENSE file included in this distribution). You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

s2i-go's People

Contributors

lukegb avatar 0xmichalis avatar jawnsy 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.