Skip to content

Commit

Permalink
feat(staged-dockerfile): add optional image-from-dockerfile reference…
Browse files Browse the repository at this point in the history
… into Image obj

Signed-off-by: Timofey Kirillov <timofey.kirillov@flant.com>
  • Loading branch information
distorhead committed Oct 14, 2022
1 parent 2bc6c30 commit deb0827
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions pkg/build/image/image.go
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/werf/logboek/pkg/style"
"github.com/werf/logboek/pkg/types"
"github.com/werf/werf/pkg/build/stage"
"github.com/werf/werf/pkg/config"
"github.com/werf/werf/pkg/container_backend"
"github.com/werf/werf/pkg/docker_registry"
"github.com/werf/werf/pkg/giterminism_manager"
Expand Down Expand Up @@ -40,6 +41,7 @@ type CommonImageOptions struct {
type ImageOptions struct {
CommonImageOptions
IsArtifact, IsDockerfileImage bool
DockerfileImageConfig *config.ImageFromDockerfile

BaseImageReference string
BaseImageName string
Expand All @@ -54,10 +56,11 @@ func NewImage(ctx context.Context, name string, baseImageType BaseImageType, opt
}

i := &Image{
Name: name,
CommonImageOptions: opts.CommonImageOptions,
IsArtifact: opts.IsArtifact,
IsDockerfileImage: opts.IsDockerfileImage,
Name: name,
CommonImageOptions: opts.CommonImageOptions,
IsArtifact: opts.IsArtifact,
IsDockerfileImage: opts.IsDockerfileImage,
DockerfileImageConfig: opts.DockerfileImageConfig,

baseImageType: baseImageType,
baseImageReference: opts.BaseImageReference,
Expand All @@ -76,9 +79,10 @@ func NewImage(ctx context.Context, name string, baseImageType BaseImageType, opt
type Image struct {
CommonImageOptions

IsArtifact bool
IsDockerfileImage bool
Name string
IsArtifact bool
IsDockerfileImage bool
Name string
DockerfileImageConfig *config.ImageFromDockerfile

stages []stage.Interface
lastNonEmptyStage stage.Interface
Expand Down

0 comments on commit deb0827

Please sign in to comment.