このコンテンツは選択した言語では利用できません。

Chapter 5. Container Image


The Go Toolset is available as a Docker-formatted container image which can be downloaded from Red Hat Container Registry.

5.1. Image Contents

The devtools/go-toolset-1.10-rhel7 image provides content corresponding to the following packages:

ComponentVersionPackage

Go

1.10.3

go-toolset-1.10

5.2. Access to the Image

To pull the devtools/go-toolset-1.10-rhel7 image, run the following command as root:

# docker pull registry.access.redhat.com/devtools/go-toolset-1.10-rhel7

5.3. Usage as Builder Image with Source-to-Image

The Go Toolset docker container image is prepared for use as a Source-to-Image (S2I) builder image.

To do so, set the following build environment variables:

IMPORT_URL
Set this variable to an URL specifying the location of the code. The rules for the go get command option apply.
INSTALL_URL

Set this variable to an URL specifying the location of the package that will provide the application’s main executable file when built. The rules for the go install command option apply.

This variable can be omitted if the main package location is identical with the location specified by the IMPORT_URL variable.

Example 5.1. Building a Go Application Image Using Source-to-Image

To build the md2man package from its GitHub repository:

$ s2i build -e IMPORT_URL='github.com/cpuguy83/go-md2man' -e INSTALL_URL='github.com/cpuguy83/go-md2man' git://github.com/cpuguy83/go-md2man  registry.access.redhat.com/devtools/go-toolset-8-rhel7 md2man-app

A locally available application image md2man-app is built from the repository on GitHub using the go-toolset-8 Docker image.

To fully leverage the Go Toolset as a S2I builder image, build custom images based on it, with modified S2I assemble scripts and further modifications to accomodate the particular application being built.

A detailed description of the Go Toolset usage with Source-to-Image is beyond the scope of this book. For more information about Source-to-Image, refer to the OpenShift Container Platform 3.7 Image Creation Guide, Chapter 4. S2I Requirements and Using Red Hat Software Collections Container Images, Chapter 2. Using Source-to-Image (S2I).

5.4. Additional Resources

Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.