Este contenido no está disponible en el idioma seleccionado.

Chapter 5. Container Image with Go Toolset for RHEL 7


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

5.1. Image Contents

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

Expand
ComponentVersionPackage

Go

1.11.5

go-toolset-1.11

5.2. Access to the Image

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

# podman pull registry.access.redhat.com/devtools/go-toolset-1.11-rhel7
Copy to Clipboard Toggle word wrap

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

The Go Toolset 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 a URL specifying the location of the code. The rules for the go get command option apply.
INSTALL_URL

Set this variable to a 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-1.11-rhel7 md2man-app
Copy to Clipboard Toggle word wrap

A locally available application image md2man-app is built from the repository on GitHub using the go-toolset-1.11 container 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

Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat