The golang package
  • Go 62.2%
  • Shell 26.1%
  • Roff 5.9%
  • Dockerfile 5.8%
Find a file
2018-11-30 17:46:32 +00:00
root Pull changes from upstream and rebase for: rebuild for latest f30 2018-11-30 17:46:32 +00:00
s2i/bin Initial go 1.11 commit 2018-09-14 15:07:11 +02:00
test Pull changes from upstream and rebase for: rebuild for latest f30 2018-11-30 17:46:32 +00:00
1.11 Pull changes from upstream and rebase for: rebuild for latest f30 2018-11-30 17:46:32 +00:00
Dockerfile Pull changes from upstream and rebase for: rebuild for latest f30 2018-11-30 17:46:32 +00:00
Dockerfile.fedora Pull changes from upstream and rebase for: rebuild for latest f30 2018-11-30 17:46:32 +00:00
help.md Pull changes from upstream and rebase for: rebuild for latest f30 2018-11-30 17:46:32 +00:00
README.md Pull changes from upstream and rebase for: rebuild for latest f30 2018-11-30 17:46:32 +00:00

Golang s2i container image

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, Docker or using source-to-image. Also the whole pipeline from build to app deployment could be run on top of the Openshift Origin or Red Hat's Openshift.

Usage

Simplest usage via s2i:

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

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

or

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

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.

Both will build test-app application image.

Environment variables

To set these environment variables, you can place them as a key value pair into a .s2i/environment file inside your source code repository or specified via s2i invocation.

  • IMPORT_URL

    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.

  • INSTALL_URL

    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.