some more renames
This commit is contained in:
parent
cbf3073fda
commit
994a412d0b
|
|
@ -83,8 +83,8 @@ var RootCmd = &cobra.Command{
|
|||
if len(opts.Destinations) == 0 && opts.ImageNameDigestFile != "" {
|
||||
return errors.New("You must provide --destination if setting ImageNameDigestFile")
|
||||
}
|
||||
// Update skipped paths
|
||||
util.UpdateInitialIgnoreList(opts.SkipVarRun)
|
||||
// Update ignored paths
|
||||
util.UpdateInitialIgnoreList(opts.IgnoreVarRun)
|
||||
}
|
||||
return nil
|
||||
},
|
||||
|
|
@ -160,7 +160,7 @@ func addKanikoOptionsFlags() {
|
|||
opts.RegistriesCertificates = make(map[string]string)
|
||||
RootCmd.PersistentFlags().VarP(&opts.RegistriesCertificates, "registry-certificate", "", "Use the provided certificate for TLS communication with the given registry. Expected format is 'my.registry.url=/path/to/the/server/certificate'.")
|
||||
RootCmd.PersistentFlags().StringVarP(&opts.RegistryMirror, "registry-mirror", "", "", "Registry mirror to use has pull-through cache instead of docker.io.")
|
||||
RootCmd.PersistentFlags().BoolVarP(&opts.SkipVarRun, "whitelist-var-run", "", true, "Ignore /var/run directory when taking image snapshot. Set it to false to preserve /var/run/ in destination image. (Default true).")
|
||||
RootCmd.PersistentFlags().BoolVarP(&opts.IgnoreVarRun, "whitelist-var-run", "", true, "Ignore /var/run directory when taking image snapshot. Set it to false to preserve /var/run/ in destination image. (Default true).")
|
||||
RootCmd.PersistentFlags().VarP(&opts.Labels, "label", "", "Set metadata for an image. Set it repeatedly for multiple labels.")
|
||||
RootCmd.PersistentFlags().BoolVarP(&opts.SkipUnusedStages, "skip-unused-stages", "", false, "Build only used stages if defined to true. Otherwise it builds by default all stages, even the unnecessaries ones until it reaches the target stage / end of Dockerfile")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ COPY --from=0 /usr/local/bin/docker-credential-gcr /kaniko/docker-credential-gcr
|
|||
COPY --from=0 /go/src/github.com/awslabs/amazon-ecr-credential-helper/bin/linux-amd64/docker-credential-ecr-login /kaniko/docker-credential-ecr-login
|
||||
COPY --from=0 /usr/local/bin/docker-credential-acr-linux /kaniko/docker-credential-acr
|
||||
COPY --from=1 /distroless/bazel-bin/experimental/busybox/busybox/ /busybox/
|
||||
# Declare /busybox as a volume to get it automatically in the path to skip
|
||||
# Declare /busybox as a volume to get it automatically in the path to ignore
|
||||
VOLUME /busybox
|
||||
COPY files/ca-certificates.crt /kaniko/ssl/certs/
|
||||
COPY --from=0 /kaniko/.docker /kaniko/.docker
|
||||
|
|
|
|||
|
|
@ -588,14 +588,14 @@ func filterMetaDiff(metaDiff []string) []string {
|
|||
func filterFileDiff(f []fileDiff) []fileDiff {
|
||||
var newDiffs []fileDiff
|
||||
for _, diff := range f {
|
||||
isSkipped := false
|
||||
isIgnored := false
|
||||
for _, p := range allowedDiffPaths {
|
||||
if util.HasFilepathPrefix(diff.Name, p, false) {
|
||||
isSkipped = true
|
||||
isIgnored = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !isSkipped {
|
||||
if !isIgnored {
|
||||
newDiffs = append(newDiffs, diff)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ type KanikoOptions struct {
|
|||
NoPush bool
|
||||
Cache bool
|
||||
Cleanup bool
|
||||
SkipVarRun bool
|
||||
IgnoreVarRun bool
|
||||
SkipUnusedStages bool
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,13 +55,13 @@ var initialIgnoreList = []IgnoreListEntry{
|
|||
PrefixMatchOnly: false,
|
||||
},
|
||||
{
|
||||
// similarly, we skip /etc/mtab, since there is no way to know if the file was mounted or came
|
||||
// similarly, we ignore /etc/mtab, since there is no way to know if the file was mounted or came
|
||||
// from the base image
|
||||
Path: "/etc/mtab",
|
||||
PrefixMatchOnly: false,
|
||||
},
|
||||
{
|
||||
// we skip /tmp/apt-key-gpghome, since the apt keys are added temporarily in this directory.
|
||||
// we ingore /tmp/apt-key-gpghome, since the apt keys are added temporarily in this directory.
|
||||
// from the base image
|
||||
Path: "/tmp/apt-key-gpghome",
|
||||
PrefixMatchOnly: true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue