Documentation
¶
Index ¶
- func EncodeArgName(name string) string
- func NewBuildkitBuilder(buildkitClient *client.Client, logger *slog.Logger) *builder
- func NewSlogWriter(logger *slog.Logger, prefix string) io.Writer
- func PutToEveryLayer(dockerfile string, content string) (string, error)
- type BuildImageOptions
- type Builder
- type EnvProcessor
- type PipelineProcessor
- type Processor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeArgName ¶
EncodeArgName encodes a variable name into a valid Docker ARG name. Docker ARG names must match ^[A-Za-z_][A-Za-z0-9_]*$. If the variable name is already valid, it is returned as-is. Otherwise, it is hashed using FNV-64a.
func NewBuildkitBuilder ¶
Types ¶
type BuildImageOptions ¶
type Builder ¶
type Builder interface {
Build(ctx context.Context, options BuildImageOptions) error
BuildOCI(ctx context.Context, options BuildImageOptions, w io.WriteCloser) error
}
type EnvProcessor ¶
type EnvProcessor struct {
Variables []string
}
func (*EnvProcessor) Process ¶
Process injects ARG and ENV statements to the Dockerfile.
It will inject the following statements:
ARG ZEABUR_ENV_XXX ZEABUR_ENV_YYY, ZEABUR_ENV_ZZZ
ENV XXX=${ZEABUR_ENV_XXX} YYY=${ZEABUR_ENV_YYY} ZZZ=${ZEABUR_ENV_ZZZ}
So you can pass the following build arguments to the build command:
ZEABUR_ENV_XXX=xxx ZEABUR_ENV_YYY=yyy ZEABUR_ENV_ZZZ=zzz
And the following environment variables will be set in the container:
XXX=xxx YYY=yyy ZZZ=zzz
type PipelineProcessor ¶
type PipelineProcessor struct {
Processors []Processor
}
func NewPipelineProcessor ¶
func NewPipelineProcessor(processors ...Processor) *PipelineProcessor
Click to show internal directories.
Click to hide internal directories.