Documentation
¶
Index ¶
Constants ¶
const DefaultName = builders.S2I
DefaultName when no WithName option is provided to NewBuilder
const GoAssembler = `` /* 1088-byte string literal not displayed */
GoAssembler
Adapted from /usr/libexec/s2i/assemble within the UBI-8 go-toolchain such that the "go build" command builds subdirectory .s2i/builds/last (where main resides) rather than the root. TODO: many apps use the pattern of having main in a subdirectory, for example the idiomatic "./cmd/myapp/main.go". It would therefore be beneficial to submit a patch to the go-toolchain source allowing this path to be customized with an environment variable instead
Variables ¶
var DefaultBuilderImages = map[string]string{ "go": DefaultGoBuilder, "node": DefaultNodeBuilder, "nodejs": DefaultNodeBuilder, "python": DefaultPythonBuilder, "quarkus": DefaultQuarkusBuilder, "typescript": DefaultNodeBuilder, }
DefaultBuilderImages for s2i builders indexed by Runtime Language
var DefaultGoBuilder = "registry.access.redhat.com/ubi8/go-toolset"
var DefaultNodeBuilder = "registry.access.redhat.com/ubi8/nodejs-20-minimal"
var DefaultPythonBuilder = "registry.access.redhat.com/ubi8/python-39"
var DefaultQuarkusBuilder = "registry.access.redhat.com/ubi8/openjdk-21"
Functions ¶
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder of functions using the s2i subsystem.
func NewBuilder ¶
NewBuilder creates a new instance of a Builder with static defaults.
func (*Builder) Build ¶
Build the function using the S2I builder.
Platforms: The S2I builder supports at most a single platform to target, and the platform specified must be available in the provided builder image. If the provided builder image is not a multi-architecture image index container, specifying a target platform is redundant, so if provided it must match that of the single-architecture container or the request is invalid.
type DockerClient ¶
type DockerClient interface { ImageBuild(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error) ImageInspectWithRaw(ctx context.Context, image string) (types.ImageInspect, []byte, error) }
DockerClient is subset of dockerClient.CommonAPIClient required by this package
type Option ¶
type Option func(*Builder)
func WithDockerClient ¶
func WithDockerClient(cli DockerClient) Option