Blob Blame History Raw
.TH Golang s2i container image
.PP
This repository contains the source for building various versions of
the Go application as a reproducible s2i container image.
Users can choose between RHEL, Fedora and CentOS based builder images.
The resulting image can be run using podman
\[la]https://github.com/containers/libpod\[ra], Docker
\[la]http://docker.io\[ra] or using source\-to\-image
\[la]https://github.com/openshift/source-to-image/\[ra]\&.
Also the whole pipeline from build to app deployment could be run on top of the Openshift Origin
\[la]https://www.okd.io/\[ra] or Red Hat's Openshift
\[la]https://www.openshift.com/\[ra]\&.

.SH Usage
.PP
Simplest usage via s2i:

.PP
s2i build ./src centos/go\-toolset\-7\-centos7:latest test\-app

.PP
where ./src directory contains git repository with golang application that has complete dependencies. You can't use incremental build in this case.

.PP
or

.PP
s2i build \-e IMPORT\_URL='github.com/cpuguy83/go\-md2man' ./src centos/go\-toolset\-7\-centos7:latest test\-app

.PP
where ./src directory contains git repository with golang application(in this case github.com/cpuguy83/go\-md2man) that has complete or incomplete dependencies. You can use incremental build in this case.

.PP
Both will build test\-app application image.

.SH Environment variables
.PP
To set these environment variables, you can place them as a key value pair into a \fB\fC\&.s2i/environment\fR
file inside your source code repository or specified via s2i invocation.
.IP \(bu 2

.PP
\fBIMPORT\_URL\fP
.PP
Used to specify the golang application import URL (i.e. usually something like github.com/someorg/somerepo), that is build. Necessary for the incremental build to function.
.IP \(bu 2

.PP
\fBINSTALL\_URL\fP
.PP
Used to specify the golang application import URL of the main package (i.e. usually something like github.com/someorg/somerepo/subfolder). Necessary if the main package is not in the root folder of the repository.