Source to image for building Go apps on OpenShift
10K+
[[go-docker-images]] = Go Docker images
image:https://travis-ci.org/openshift-s2i/s2i-go.svg?branch=master["Build Status", link="https://travis-ci.org/openshift-s2i/s2i-go"]
This repository contains the source for creating a https://github.com/openshift/source-to-image[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 https://docker.com[Docker].
For more information about using these images with OpenShift, please see the official https://docs.openshift.org/latest/using_images/s2i_images/php.html[OpenShift Documentation].
[[versions]] == Versions
Go versions currently supported are:
The following operating system base images are supported:
[[installation]] == Installation
To build a Go builder image, execute:
Alternatively, you can pull the CentOS image from Docker Hub via:
Notice: By omitting the VERSION parameter, the build/test action will
be performed on all the supported versions of Go.
[[usage]] == Usage
There are several sample Go applications included with this repository. To build a simple Go test application using the standalone
The resulting image can be executed using https://docker.com[docker]:
Once the container is running, it should be accessible using:
[[test]] == 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:
Notice: By omitting the VERSION parameter, the build/test action will
be performed on all the supported versions of Go.
[[repository-organization]] 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]]
Image name structure
~~~~~~~~~~~~~~~~~~~~
[[structure-openshift1-2-3]]
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]]
Contributing
~~~~~~~~~~~~
Contributions to this project (in the form of bug reports, patches, or pull
requests) are gratefully accepted by the maintainer.
[[copyright-license]]
Copyright and License
~~~~~~~~~~~~~~~~~~~~~
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.
Content type
Image
Digest
Size
242.2 MB
Last updated
over 8 years ago
docker pull jatescher/s2i-go