step

package
v0.0.0-...-f292767 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package step defines Dockerfile steps

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddStep

type AddStep struct {
	// contains filtered or unexported fields
}

AddStep implements Dockerfile COPY step.

func Add

func Add(src, dst string) *AddStep

Add creates new AddStep.

func (*AddStep) Generate

func (step *AddStep) Generate(w io.Writer) error

Generate implements Step interface.

func (*AddStep) Step

func (step *AddStep) Step()

Step implements Step interface.

type ArgStep

type ArgStep struct {
	// contains filtered or unexported fields
}

ArgStep implements Dockerfile ARG step.

func Arg

func Arg(arg string) *ArgStep

Arg creates new AregStep.

func (*ArgStep) Generate

func (step *ArgStep) Generate(w io.Writer) error

Generate implements Step interface.

func (*ArgStep) Step

func (step *ArgStep) Step()

Step implements Step interface.

type CopyStep

type CopyStep struct {
	// contains filtered or unexported fields
}

CopyStep implements Dockerfile COPY step.

func Copy

func Copy(src, dst string) *CopyStep

Copy creates new CopyStep.

func (*CopyStep) Depends

func (step *CopyStep) Depends() []string

Depends implements StageDependencies.

func (*CopyStep) From

func (step *CopyStep) From(stage string) *CopyStep

From sets --from argument.

func (*CopyStep) Generate

func (step *CopyStep) Generate(w io.Writer) error

Generate implements Step interface.

func (*CopyStep) Platform

func (step *CopyStep) Platform(platform string) *CopyStep

Platform sets --platform argument.

func (*CopyStep) Step

func (step *CopyStep) Step()

Step implements Step interface.

type EntrypointStep

type EntrypointStep struct {
	// contains filtered or unexported fields
}

EntrypointStep implements Dockerfile ENTRYPOINT step.

func Entrypoint

func Entrypoint(command string, args ...string) *EntrypointStep

Entrypoint creates new EntrypointStep.

func (*EntrypointStep) Generate

func (step *EntrypointStep) Generate(w io.Writer) error

Generate implements Step interface.

func (*EntrypointStep) Step

func (step *EntrypointStep) Step()

Step implements Step interface.

type EnvStep

type EnvStep struct {
	// contains filtered or unexported fields
}

EnvStep implements Dockerfile ENV step.

func Env

func Env(name, value string) *EnvStep

Env creates new EnvStep.

func (*EnvStep) Generate

func (step *EnvStep) Generate(w io.Writer) error

Generate implements Step interface.

func (*EnvStep) Step

func (step *EnvStep) Step()

Step implements Step interface.

type LabelStep

type LabelStep struct {
	// contains filtered or unexported fields
}

LabelStep implements Dockerfile LABEL step.

func Label

func Label(key, value string) *LabelStep

Label creates new LabelStep.

func (*LabelStep) Generate

func (step *LabelStep) Generate(w io.Writer) error

Generate implements Step interface.

func (*LabelStep) Step

func (step *LabelStep) Step()

Step implements Step interface.

type RunStep

type RunStep struct {
	// contains filtered or unexported fields
}

RunStep implements Dockerfile RUN step.

func Run

func Run(command string, args ...string) *RunStep

Run creates new RunStep from command + args, properly escaping them.

func Script

func Script(script string) *RunStep

Script creates new Run step from shell script, it prints it verbatim.

func (*RunStep) Env

func (step *RunStep) Env(name, value string) *RunStep

Env sets up environment variables for the step.

func (*RunStep) Generate

func (step *RunStep) Generate(w io.Writer) error

Generate implements Step interface.

func (*RunStep) MountCache

func (step *RunStep) MountCache(target string) *RunStep

MountCache mounts cache at specified target path.

func (*RunStep) SecurityInsecure

func (step *RunStep) SecurityInsecure() *RunStep

SecurityInsecure enables --security=insecure.

func (*RunStep) Step

func (step *RunStep) Step()

Step implements Step interface.

type StageDependencies

type StageDependencies interface {
	Depends() []string
}

StageDependencies is implemented by steps which introduce dependencies to other stages.

type Step

type Step interface {
	Step()

	Generate(w io.Writer) error
}

Step is an interface implemented by all Dockerfile steps.

type WorkDirStep

type WorkDirStep struct {
	// contains filtered or unexported fields
}

WorkDirStep implements Dockerfile WORKDIR step.

func WorkDir

func WorkDir(dir string) *WorkDirStep

WorkDir creates new WorkDirStep.

func (*WorkDirStep) Generate

func (step *WorkDirStep) Generate(w io.Writer) error

Generate implements Step interface.

func (*WorkDirStep) Step

func (step *WorkDirStep) Step()

Step implements Step interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL