package
17.12.1-ce-rc2+incompatible
Repository: https://github.com/nobidev/docker-cli.git
Documentation: pkg.go.dev
# Functions
CurrentStage return the last stage in a slice.
HasStage looks for the presence of a given stage name.
IsCurrentStage check if the stage name is the current stage.
IsUnknownInstruction checks if the error is an UnknownInstruction or a parseError containing an UnknownInstruction.
NewBFlags returns the new BFlags struct.
NewBFlagsWithArgs returns the new BFlags struct with Args set to args.
Parse a docker file into a collection of buildable stages.
ParseCommand converts an AST to a typed Command.
ParseInstruction converts an AST to a typed instruction (either a command or a build stage beginning when encountering a `FROM` statement).
# Structs
AddCommand : ADD foo /path
Add the file 'foo' to '/path'.
ArgCommand : ARG name[=value]
Adds the variable foo to the trusted list of variables that can be passed to builder using the --build-arg flag for expansion/substitution or passing to 'run'.
BFlags contains all flags information for the builder.
CmdCommand : CMD foo
Set the default command to run in the container (which may be empty).
CopyCommand : COPY foo /path
Same as 'ADD' but without the tar and remote url handling.
EntrypointCommand : ENTRYPOINT /usr/sbin/nginx
Set the entrypoint to /usr/sbin/nginx.
EnvCommand : ENV key1 value1 [keyN valueN...].
ExposeCommand : EXPOSE 6667/tcp 7000/tcp
Expose ports for links and port mappings.
Flag contains all information for a flag.
HealthCheckCommand : HEALTHCHECK foo
Set the default healthcheck command to run in the container (which may be empty).
KeyValuePair represent an arbitrary named value (useful in slice insted of map[string] string to preserve ordering).
LabelCommand : LABEL some json data describing the image
Sets the Label variable foo to bar,
.
MaintainerCommand : MAINTAINER maintainer_name.
OnbuildCommand : ONBUILD <some other command>.
RunCommand : RUN some command yo
run a command and commit the image.
ShellCommand : SHELL powershell -command
Set the non-default shell to use.
ShellDependantCmdLine represents a cmdline optionaly prepended with the shell.
Stage represents a single stage in a multi-stage build.
StopSignalCommand : STOPSIGNAL signal
Set the signal that will be used to kill the container.
UnknownInstruction represents an error occurring when a command is unresolvable.
UserCommand : USER foo
Set the user to 'foo' for future commands and when running the ENTRYPOINT/CMD at container run time.
VolumeCommand : VOLUME /foo
Expose the volume /foo for use.
WorkdirCommand : WORKDIR /tmp
Set the working directory for future RUN/CMD/etc statements.
# Interfaces
Command is implemented by every command present in a dockerfile.
PlatformSpecific adds platform checks to a command.
SupportsSingleWordExpansion interface marks a command as supporting variable expansion.
# Type aliases
FlagType is the type of the build flag.
KeyValuePairs is a slice of KeyValuePair.
SingleWordExpander is a provider for variable expansion where 1 word => 1 output.
SourcesAndDest represent a list of source files and a destination.