summaryrefslogtreecommitdiff
path: root/vendor/github.com/containers/buildah/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/containers/buildah/config.go')
-rw-r--r--vendor/github.com/containers/buildah/config.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/vendor/github.com/containers/buildah/config.go b/vendor/github.com/containers/buildah/config.go
index 9bed6542f..99cd40208 100644
--- a/vendor/github.com/containers/buildah/config.go
+++ b/vendor/github.com/containers/buildah/config.go
@@ -7,6 +7,7 @@ import (
"strings"
"time"
+ "github.com/containers/buildah/define"
"github.com/containers/buildah/docker"
"github.com/containers/image/v5/manifest"
"github.com/containers/image/v5/transports"
@@ -108,7 +109,7 @@ func (b *Builder) fixupConfig() {
if b.Architecture() == "" {
b.SetArchitecture(runtime.GOARCH)
}
- if b.Format == Dockerv2ImageManifest && b.Hostname() == "" {
+ if b.Format == define.Dockerv2ImageManifest && b.Hostname() == "" {
b.SetHostname(stringid.TruncateID(stringid.GenerateRandomID()))
}
}
@@ -219,7 +220,7 @@ func (b *Builder) ClearOnBuild() {
// Note: this setting is not present in the OCIv1 image format, so it is
// discarded when writing images using OCIv1 formats.
func (b *Builder) SetOnBuild(onBuild string) {
- if onBuild != "" && b.Format != Dockerv2ImageManifest {
+ if onBuild != "" && b.Format != define.Dockerv2ImageManifest {
logrus.Warnf("ONBUILD is not supported for OCI image format, %s will be ignored. Must use `docker` format", onBuild)
}
b.Docker.Config.OnBuild = append(b.Docker.Config.OnBuild, onBuild)
@@ -251,7 +252,7 @@ func (b *Builder) Shell() []string {
// Note: this setting is not present in the OCIv1 image format, so it is
// discarded when writing images using OCIv1 formats.
func (b *Builder) SetShell(shell []string) {
- if len(shell) > 0 && b.Format != Dockerv2ImageManifest {
+ if len(shell) > 0 && b.Format != define.Dockerv2ImageManifest {
logrus.Warnf("SHELL is not supported for OCI image format, %s will be ignored. Must use `docker` format", shell)
}
@@ -488,7 +489,7 @@ func (b *Builder) Domainname() string {
// Note: this setting is not present in the OCIv1 image format, so it is
// discarded when writing images using OCIv1 formats.
func (b *Builder) SetDomainname(name string) {
- if name != "" && b.Format != Dockerv2ImageManifest {
+ if name != "" && b.Format != define.Dockerv2ImageManifest {
logrus.Warnf("DOMAINNAME is not supported for OCI image format, domainname %s will be ignored. Must use `docker` format", name)
}
b.Docker.Config.Domainname = name
@@ -510,7 +511,7 @@ func (b *Builder) Comment() string {
// Note: this setting is not present in the OCIv1 image format, so it is
// discarded when writing images using OCIv1 formats.
func (b *Builder) SetComment(comment string) {
- if comment != "" && b.Format != Dockerv2ImageManifest {
+ if comment != "" && b.Format != define.Dockerv2ImageManifest {
logrus.Warnf("COMMENT is not supported for OCI image format, comment %s will be ignored. Must use `docker` format", comment)
}
b.Docker.Comment = comment
@@ -565,7 +566,7 @@ func (b *Builder) Healthcheck() *docker.HealthConfig {
func (b *Builder) SetHealthcheck(config *docker.HealthConfig) {
b.Docker.Config.Healthcheck = nil
if config != nil {
- if b.Format != Dockerv2ImageManifest {
+ if b.Format != define.Dockerv2ImageManifest {
logrus.Warnf("Healthcheck is not supported for OCI image format and will be ignored. Must use `docker` format")
}
b.Docker.Config.Healthcheck = &docker.HealthConfig{