mirror of
https://github.com/thegeeklab/drone-docker.git
synced 2024-11-23 13:20:40 +00:00
docs: add parameter documentation (#26)
This commit is contained in:
parent
916bfebb37
commit
3fd42b869c
107
README.md
107
README.md
@ -50,6 +50,113 @@ docker run --rm \
|
|||||||
thegeeklab/drone-docker --dry-run
|
thegeeklab/drone-docker --dry-run
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
|
||||||
|
dry_run
|
||||||
|
: disables docker push
|
||||||
|
|
||||||
|
drone_remote_url
|
||||||
|
: sets the git remote url
|
||||||
|
|
||||||
|
mirror
|
||||||
|
: sets a registry mirror to pull images
|
||||||
|
|
||||||
|
storage_driver
|
||||||
|
: sets the docker daemon storage driver
|
||||||
|
|
||||||
|
storage_path (default `/var/lib/docker`)
|
||||||
|
: sets the docker daemon storage path
|
||||||
|
|
||||||
|
bip
|
||||||
|
: allows the docker daemon to bride ip address
|
||||||
|
|
||||||
|
mtu
|
||||||
|
: sets docker daemon custom mtu setting
|
||||||
|
|
||||||
|
custom_dns
|
||||||
|
: sets custom docker daemon dns server
|
||||||
|
|
||||||
|
custom_dns_search
|
||||||
|
: sets custom docker daemon dns search domain
|
||||||
|
|
||||||
|
insecure
|
||||||
|
: allows the docker daemon to use insecure registries
|
||||||
|
|
||||||
|
ipv6
|
||||||
|
: enables docker daemon ipv6 support
|
||||||
|
|
||||||
|
experimental
|
||||||
|
: enables docker daemon experimental mode
|
||||||
|
|
||||||
|
debug "docker_launch_debug
|
||||||
|
: enables verbose debug mode for the docker daemon
|
||||||
|
|
||||||
|
daemon_off
|
||||||
|
: disables the startup of the docker daemon
|
||||||
|
|
||||||
|
dockerfile (default `./Dockerfile`)
|
||||||
|
: sets dockerfile to use for the image build
|
||||||
|
|
||||||
|
context (default `./`)
|
||||||
|
: sets the path of the build context to use
|
||||||
|
|
||||||
|
tags (default `latest`)
|
||||||
|
: sets repository tags to use for the image; tags can also be loaded from a `.tags` file
|
||||||
|
|
||||||
|
auto_tag
|
||||||
|
: generates tag names automatically based on git branch and git tag
|
||||||
|
|
||||||
|
auto_tag_suffix
|
||||||
|
: generates tag names with the given suffix
|
||||||
|
|
||||||
|
build_args
|
||||||
|
: sets custom build arguments for the build
|
||||||
|
|
||||||
|
build_args_from_env
|
||||||
|
: forwards environment variables as custom arguments to the build
|
||||||
|
|
||||||
|
quiet
|
||||||
|
: enables suppression of the build output
|
||||||
|
|
||||||
|
target
|
||||||
|
: sets the build target to use
|
||||||
|
|
||||||
|
cache_from
|
||||||
|
: sets images to consider as cache sources
|
||||||
|
|
||||||
|
pull_image (default `true`)
|
||||||
|
: enforces to pull base image at build time
|
||||||
|
|
||||||
|
compress
|
||||||
|
: enables compression og the build context using gzip
|
||||||
|
|
||||||
|
repo
|
||||||
|
: sets repository name for the image
|
||||||
|
|
||||||
|
registry (default `https://index.docker.io/v1/`)
|
||||||
|
: sets docker registry to authenticate with
|
||||||
|
|
||||||
|
username
|
||||||
|
: sets username to authenticates with
|
||||||
|
|
||||||
|
password
|
||||||
|
: sets password to authenticates with
|
||||||
|
|
||||||
|
email
|
||||||
|
: sets email addres to authenticates with
|
||||||
|
|
||||||
|
config
|
||||||
|
: sets content of the docker daemon json config
|
||||||
|
|
||||||
|
purge (default `true`)
|
||||||
|
: enables cleanup of the docker environment at the end of a build
|
||||||
|
|
||||||
|
no_cache
|
||||||
|
: disables the usage of cached intermediate containers
|
||||||
|
|
||||||
|
add_host
|
||||||
|
: sets additional host:ip mapping
|
||||||
|
|
||||||
## Contributors
|
## Contributors
|
||||||
|
|
||||||
Special thanks goes to all [contributors](https://github.com/thegeeklab/drone-docker/graphs/contributors). If you would like to contribute,
|
Special thanks goes to all [contributors](https://github.com/thegeeklab/drone-docker/graphs/contributors). If you would like to contribute,
|
||||||
|
@ -10,226 +10,220 @@ func settingsFlags(settings *plugin.Settings) []cli.Flag {
|
|||||||
return []cli.Flag{
|
return []cli.Flag{
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "dry-run",
|
Name: "dry-run",
|
||||||
Usage: "dry run disables docker push",
|
|
||||||
EnvVars: []string{"PLUGIN_DRY_RUN"},
|
EnvVars: []string{"PLUGIN_DRY_RUN"},
|
||||||
|
Usage: "disables docker push",
|
||||||
Destination: &settings.Dryrun,
|
Destination: &settings.Dryrun,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "remote.url",
|
Name: "remote.url",
|
||||||
Usage: "git remote url",
|
|
||||||
EnvVars: []string{"DRONE_REMOTE_URL"},
|
EnvVars: []string{"DRONE_REMOTE_URL"},
|
||||||
|
Usage: "sets the git remote url",
|
||||||
Destination: &settings.Build.Remote,
|
Destination: &settings.Build.Remote,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "daemon.mirror",
|
Name: "daemon.mirror",
|
||||||
Usage: "docker daemon registry mirror",
|
|
||||||
EnvVars: []string{"PLUGIN_MIRROR", "DOCKER_PLUGIN_MIRROR"},
|
EnvVars: []string{"PLUGIN_MIRROR", "DOCKER_PLUGIN_MIRROR"},
|
||||||
|
Usage: "sets a registry mirror to pull images",
|
||||||
Destination: &settings.Daemon.Mirror,
|
Destination: &settings.Daemon.Mirror,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "daemon.storage-driver",
|
Name: "daemon.storage-driver",
|
||||||
Usage: "docker daemon storage driver",
|
|
||||||
EnvVars: []string{"PLUGIN_STORAGE_DRIVER"},
|
EnvVars: []string{"PLUGIN_STORAGE_DRIVER"},
|
||||||
|
Usage: "sets the docker daemon storage driver",
|
||||||
Destination: &settings.Daemon.StorageDriver,
|
Destination: &settings.Daemon.StorageDriver,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "daemon.storage-path",
|
Name: "daemon.storage-path",
|
||||||
Usage: "docker daemon storage path",
|
|
||||||
Value: "/var/lib/docker",
|
|
||||||
EnvVars: []string{"PLUGIN_STORAGE_PATH"},
|
EnvVars: []string{"PLUGIN_STORAGE_PATH"},
|
||||||
|
Usage: "sets the docker daemon storage path",
|
||||||
|
Value: "/var/lib/docker",
|
||||||
Destination: &settings.Daemon.StoragePath,
|
Destination: &settings.Daemon.StoragePath,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "daemon.bip",
|
Name: "daemon.bip",
|
||||||
Usage: "docker daemon bride ip address",
|
|
||||||
EnvVars: []string{"PLUGIN_BIP"},
|
EnvVars: []string{"PLUGIN_BIP"},
|
||||||
|
Usage: "allows the docker daemon to bride ip address",
|
||||||
Destination: &settings.Daemon.Bip,
|
Destination: &settings.Daemon.Bip,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "daemon.mtu",
|
Name: "daemon.mtu",
|
||||||
Usage: "docker daemon custom mtu setting",
|
|
||||||
EnvVars: []string{"PLUGIN_MTU"},
|
EnvVars: []string{"PLUGIN_MTU"},
|
||||||
|
Usage: "sets docker daemon custom mtu setting",
|
||||||
Destination: &settings.Daemon.MTU,
|
Destination: &settings.Daemon.MTU,
|
||||||
},
|
},
|
||||||
&cli.StringSliceFlag{
|
&cli.StringSliceFlag{
|
||||||
Name: "daemon.dns",
|
Name: "daemon.dns",
|
||||||
Usage: "docker daemon dns server",
|
|
||||||
EnvVars: []string{"PLUGIN_CUSTOM_DNS"},
|
EnvVars: []string{"PLUGIN_CUSTOM_DNS"},
|
||||||
|
Usage: "sets custom docker daemon dns server",
|
||||||
Destination: &settings.Daemon.DNS,
|
Destination: &settings.Daemon.DNS,
|
||||||
},
|
},
|
||||||
&cli.StringSliceFlag{
|
&cli.StringSliceFlag{
|
||||||
Name: "daemon.dns-search",
|
Name: "daemon.dns-search",
|
||||||
Usage: "docker daemon dns search domains",
|
|
||||||
EnvVars: []string{"PLUGIN_CUSTOM_DNS_SEARCH"},
|
EnvVars: []string{"PLUGIN_CUSTOM_DNS_SEARCH"},
|
||||||
|
Usage: "sets custom docker daemon dns search domain",
|
||||||
Destination: &settings.Daemon.DNSSearch,
|
Destination: &settings.Daemon.DNSSearch,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "daemon.insecure",
|
Name: "daemon.insecure",
|
||||||
Usage: "docker daemon allows insecure registries",
|
|
||||||
EnvVars: []string{"PLUGIN_INSECURE"},
|
EnvVars: []string{"PLUGIN_INSECURE"},
|
||||||
|
Usage: "allows the docker daemon to use insecure registries",
|
||||||
Destination: &settings.Daemon.Insecure,
|
Destination: &settings.Daemon.Insecure,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "daemon.ipv6",
|
Name: "daemon.ipv6",
|
||||||
Usage: "docker daemon IPv6 networking",
|
|
||||||
EnvVars: []string{"PLUGIN_IPV6"},
|
EnvVars: []string{"PLUGIN_IPV6"},
|
||||||
|
Usage: "enables docker daemon IPv6 support",
|
||||||
Destination: &settings.Daemon.IPv6,
|
Destination: &settings.Daemon.IPv6,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "daemon.experimental",
|
Name: "daemon.experimental",
|
||||||
Usage: "docker daemon Experimental mode",
|
|
||||||
EnvVars: []string{"PLUGIN_EXPERIMENTAL"},
|
EnvVars: []string{"PLUGIN_EXPERIMENTAL"},
|
||||||
|
Usage: "enables docker daemon experimental mode",
|
||||||
Destination: &settings.Daemon.Experimental,
|
Destination: &settings.Daemon.Experimental,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "daemon.debug",
|
Name: "daemon.debug",
|
||||||
Usage: "docker daemon executes in debug mode",
|
|
||||||
EnvVars: []string{"PLUGIN_DEBUG", "DOCKER_LAUNCH_DEBUG"},
|
EnvVars: []string{"PLUGIN_DEBUG", "DOCKER_LAUNCH_DEBUG"},
|
||||||
|
Usage: "enables verbose debug mode for the docker daemon",
|
||||||
Destination: &settings.Daemon.Debug,
|
Destination: &settings.Daemon.Debug,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "daemon.off",
|
Name: "daemon.off",
|
||||||
Usage: "don't start the docker daemon",
|
|
||||||
EnvVars: []string{"PLUGIN_DAEMON_OFF"},
|
EnvVars: []string{"PLUGIN_DAEMON_OFF"},
|
||||||
|
Usage: "disables the startup of the docker daemon",
|
||||||
Destination: &settings.Daemon.Disabled,
|
Destination: &settings.Daemon.Disabled,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "dockerfile",
|
Name: "dockerfile",
|
||||||
Usage: "build dockerfile",
|
|
||||||
Value: "Dockerfile",
|
|
||||||
EnvVars: []string{"PLUGIN_DOCKERFILE"},
|
EnvVars: []string{"PLUGIN_DOCKERFILE"},
|
||||||
|
Usage: "sets dockerfile to use for the image build",
|
||||||
|
Value: "Dockerfile",
|
||||||
Destination: &settings.Build.Dockerfile,
|
Destination: &settings.Build.Dockerfile,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "context",
|
Name: "context",
|
||||||
Usage: "build context",
|
|
||||||
Value: ".",
|
|
||||||
EnvVars: []string{"PLUGIN_CONTEXT"},
|
EnvVars: []string{"PLUGIN_CONTEXT"},
|
||||||
|
Usage: "sets the path of the build context to use",
|
||||||
|
Value: ".",
|
||||||
Destination: &settings.Build.Context,
|
Destination: &settings.Build.Context,
|
||||||
},
|
},
|
||||||
&cli.StringSliceFlag{
|
&cli.StringSliceFlag{
|
||||||
Name: "tags",
|
Name: "tags",
|
||||||
Usage: "build tags",
|
|
||||||
Value: cli.NewStringSlice([]string{"latest"}...),
|
|
||||||
EnvVars: []string{"PLUGIN_TAG", "PLUGIN_TAGS"},
|
EnvVars: []string{"PLUGIN_TAG", "PLUGIN_TAGS"},
|
||||||
|
Usage: "sets repository tags to use for the image",
|
||||||
|
Value: cli.NewStringSlice([]string{"latest"}...),
|
||||||
FilePath: ".tags",
|
FilePath: ".tags",
|
||||||
Destination: &settings.Build.Tags,
|
Destination: &settings.Build.Tags,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "tags.auto",
|
Name: "tags.auto",
|
||||||
Usage: "default build tags",
|
|
||||||
EnvVars: []string{"PLUGIN_DEFAULT_TAGS", "PLUGIN_AUTO_TAG"},
|
EnvVars: []string{"PLUGIN_DEFAULT_TAGS", "PLUGIN_AUTO_TAG"},
|
||||||
|
Usage: "generates tag names automatically based on git branch and git tag",
|
||||||
Destination: &settings.Build.TagsAuto,
|
Destination: &settings.Build.TagsAuto,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "tags.suffix",
|
Name: "tags.suffix",
|
||||||
Usage: "default build tags with suffix",
|
|
||||||
EnvVars: []string{"PLUGIN_DEFAULT_SUFFIX", "PLUGIN_AUTO_TAG_SUFFIX"},
|
EnvVars: []string{"PLUGIN_DEFAULT_SUFFIX", "PLUGIN_AUTO_TAG_SUFFIX"},
|
||||||
|
Usage: "generates tag names with the given suffix",
|
||||||
Destination: &settings.Build.TagsSuffix,
|
Destination: &settings.Build.TagsSuffix,
|
||||||
},
|
},
|
||||||
&cli.StringSliceFlag{
|
&cli.StringSliceFlag{
|
||||||
Name: "args",
|
Name: "args",
|
||||||
Usage: "build args",
|
|
||||||
EnvVars: []string{"PLUGIN_BUILD_ARGS"},
|
EnvVars: []string{"PLUGIN_BUILD_ARGS"},
|
||||||
|
Usage: "sets custom build arguments for the build",
|
||||||
Destination: &settings.Build.Args,
|
Destination: &settings.Build.Args,
|
||||||
},
|
},
|
||||||
&cli.StringSliceFlag{
|
&cli.StringSliceFlag{
|
||||||
Name: "args-from-env",
|
Name: "args-from-env",
|
||||||
Usage: "build args",
|
|
||||||
EnvVars: []string{"PLUGIN_BUILD_ARGS_FROM_ENV"},
|
EnvVars: []string{"PLUGIN_BUILD_ARGS_FROM_ENV"},
|
||||||
|
Usage: "forwards environment variables as custom arguments to the build",
|
||||||
Destination: &settings.Build.ArgsEnv,
|
Destination: &settings.Build.ArgsEnv,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "quiet",
|
Name: "quiet",
|
||||||
Usage: "quiet docker build",
|
|
||||||
EnvVars: []string{"PLUGIN_QUIET"},
|
EnvVars: []string{"PLUGIN_QUIET"},
|
||||||
|
Usage: "enables suppression of the build output",
|
||||||
Destination: &settings.Build.Quiet,
|
Destination: &settings.Build.Quiet,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "target",
|
Name: "target",
|
||||||
Usage: "build target",
|
|
||||||
EnvVars: []string{"PLUGIN_TARGET"},
|
EnvVars: []string{"PLUGIN_TARGET"},
|
||||||
|
Usage: "sets the build target to use",
|
||||||
Destination: &settings.Build.Target,
|
Destination: &settings.Build.Target,
|
||||||
},
|
},
|
||||||
&cli.StringSliceFlag{
|
&cli.StringSliceFlag{
|
||||||
Name: "cache-from",
|
Name: "cache-from",
|
||||||
Usage: "images to consider as cache sources",
|
|
||||||
EnvVars: []string{"PLUGIN_CACHE_FROM"},
|
EnvVars: []string{"PLUGIN_CACHE_FROM"},
|
||||||
|
Usage: "sets images to consider as cache sources",
|
||||||
Destination: &settings.Build.CacheFrom,
|
Destination: &settings.Build.CacheFrom,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
|
||||||
Name: "squash",
|
|
||||||
Usage: "squash the layers at build time",
|
|
||||||
EnvVars: []string{"PLUGIN_SQUASH"},
|
|
||||||
Destination: &settings.Build.Squash,
|
|
||||||
},
|
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "pull-image",
|
Name: "pull-image",
|
||||||
Usage: "force pull base image at build time",
|
|
||||||
EnvVars: []string{"PLUGIN_PULL_IMAGE"},
|
EnvVars: []string{"PLUGIN_PULL_IMAGE"},
|
||||||
|
Usage: "enforces to pull base image at build time",
|
||||||
Value: true,
|
Value: true,
|
||||||
Destination: &settings.Build.Pull,
|
Destination: &settings.Build.Pull,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "compress",
|
Name: "compress",
|
||||||
Usage: "compress the build context using gzip",
|
|
||||||
EnvVars: []string{"PLUGIN_COMPRESS"},
|
EnvVars: []string{"PLUGIN_COMPRESS"},
|
||||||
|
Usage: "enables compression og the build context using gzip",
|
||||||
Destination: &settings.Build.Compress,
|
Destination: &settings.Build.Compress,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Usage: "docker repository",
|
|
||||||
EnvVars: []string{"PLUGIN_REPO"},
|
EnvVars: []string{"PLUGIN_REPO"},
|
||||||
|
Usage: "sets repository name for the image",
|
||||||
Destination: &settings.Build.Repo,
|
Destination: &settings.Build.Repo,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "docker.registry",
|
Name: "docker.registry",
|
||||||
Usage: "docker registry",
|
|
||||||
Value: "https://index.docker.io/v1/",
|
|
||||||
EnvVars: []string{"PLUGIN_REGISTRY", "DOCKER_REGISTRY"},
|
EnvVars: []string{"PLUGIN_REGISTRY", "DOCKER_REGISTRY"},
|
||||||
|
Usage: "sets docker registry to authenticate with",
|
||||||
|
Value: "https://index.docker.io/v1/",
|
||||||
Destination: &settings.Login.Registry,
|
Destination: &settings.Login.Registry,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "docker.username",
|
Name: "docker.username",
|
||||||
Usage: "docker username",
|
|
||||||
EnvVars: []string{"PLUGIN_USERNAME", "DOCKER_USERNAME"},
|
EnvVars: []string{"PLUGIN_USERNAME", "DOCKER_USERNAME"},
|
||||||
|
Usage: "sets username to authenticates with",
|
||||||
Destination: &settings.Login.Username,
|
Destination: &settings.Login.Username,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "docker.password",
|
Name: "docker.password",
|
||||||
Usage: "docker password",
|
|
||||||
EnvVars: []string{"PLUGIN_PASSWORD", "DOCKER_PASSWORD"},
|
EnvVars: []string{"PLUGIN_PASSWORD", "DOCKER_PASSWORD"},
|
||||||
|
Usage: "sets password to authenticates with",
|
||||||
Destination: &settings.Login.Password,
|
Destination: &settings.Login.Password,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "docker.email",
|
Name: "docker.email",
|
||||||
Usage: "docker email",
|
|
||||||
EnvVars: []string{"PLUGIN_EMAIL", "DOCKER_EMAIL"},
|
EnvVars: []string{"PLUGIN_EMAIL", "DOCKER_EMAIL"},
|
||||||
|
Usage: "sets email addres to authenticates with",
|
||||||
Destination: &settings.Login.Email,
|
Destination: &settings.Login.Email,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "docker.config",
|
Name: "docker.config",
|
||||||
Usage: "docker json dockerconfig content",
|
|
||||||
EnvVars: []string{"PLUGIN_CONFIG", "DOCKER_PLUGIN_CONFIG"},
|
EnvVars: []string{"PLUGIN_CONFIG", "DOCKER_PLUGIN_CONFIG"},
|
||||||
|
Usage: "sets content of the docker daemon json config",
|
||||||
Destination: &settings.Login.Config,
|
Destination: &settings.Login.Config,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "docker.purge",
|
Name: "docker.purge",
|
||||||
Usage: "docker should cleanup images",
|
|
||||||
EnvVars: []string{"PLUGIN_PURGE"},
|
EnvVars: []string{"PLUGIN_PURGE"},
|
||||||
|
Usage: "enables cleanup of the docker environment at the end of a build",
|
||||||
Value: true,
|
Value: true,
|
||||||
Destination: &settings.Cleanup,
|
Destination: &settings.Cleanup,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "no-cache",
|
Name: "no-cache",
|
||||||
Usage: "do not use cached intermediate containers",
|
|
||||||
EnvVars: []string{"PLUGIN_NO_CACHE"},
|
EnvVars: []string{"PLUGIN_NO_CACHE"},
|
||||||
|
Usage: "disables the usage of cached intermediate containers",
|
||||||
Destination: &settings.Build.NoCache,
|
Destination: &settings.Build.NoCache,
|
||||||
},
|
},
|
||||||
&cli.StringSliceFlag{
|
&cli.StringSliceFlag{
|
||||||
Name: "add-host",
|
Name: "add-host",
|
||||||
Usage: "additional host:IP mapping",
|
|
||||||
EnvVars: []string{"PLUGIN_ADD_HOST"},
|
EnvVars: []string{"PLUGIN_ADD_HOST"},
|
||||||
|
Usage: "sets additional host:ip mapping",
|
||||||
Destination: &settings.Build.AddHost,
|
Destination: &settings.Build.AddHost,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -66,9 +66,6 @@ func commandBuild(build Build) *exec.Cmd {
|
|||||||
}
|
}
|
||||||
|
|
||||||
args = append(args, build.Context)
|
args = append(args, build.Context)
|
||||||
if build.Squash {
|
|
||||||
args = append(args, "--squash")
|
|
||||||
}
|
|
||||||
if build.Compress {
|
if build.Compress {
|
||||||
args = append(args, "--compress")
|
args = append(args, "--compress")
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,6 @@ type Build struct {
|
|||||||
Args cli.StringSlice // Docker build args
|
Args cli.StringSlice // Docker build args
|
||||||
ArgsEnv cli.StringSlice // Docker build args from env
|
ArgsEnv cli.StringSlice // Docker build args from env
|
||||||
Target string // Docker build target
|
Target string // Docker build target
|
||||||
Squash bool // Docker build squash
|
|
||||||
Pull bool // Docker build pull
|
Pull bool // Docker build pull
|
||||||
CacheFrom cli.StringSlice // Docker build cache-from
|
CacheFrom cli.StringSlice // Docker build cache-from
|
||||||
Compress bool // Docker build compress
|
Compress bool // Docker build compress
|
||||||
@ -153,11 +152,6 @@ func (p *Plugin) Execute() error {
|
|||||||
fmt.Println("Registry credentials or Docker config not provided. Guest mode enabled.")
|
fmt.Println("Registry credentials or Docker config not provided. Guest mode enabled.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.settings.Build.Squash && !p.settings.Daemon.Experimental {
|
|
||||||
fmt.Println("Squash build flag is only available when Docker deamon is started with experimental flag. Ignoring...")
|
|
||||||
p.settings.Build.Squash = false
|
|
||||||
}
|
|
||||||
|
|
||||||
// add proxy build args
|
// add proxy build args
|
||||||
addProxyBuildArgs(&p.settings.Build)
|
addProxyBuildArgs(&p.settings.Build)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user