Skip to content

Commit

Permalink
fix(staged-dockerfile): meaningful message about staged: true availab…
Browse files Browse the repository at this point in the history
…le only for buildah backend and not avaiable for docker server backend

Refs #2215 (comment)

Signed-off-by: Timofey Kirillov <timofey.kirillov@flant.com>
  • Loading branch information
distorhead committed Mar 17, 2023
1 parent 86ead24 commit 633ef1f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/container_backend/docker_server_backend.go
Expand Up @@ -94,7 +94,12 @@ func (runtime *DockerServerBackend) BuildDockerfile(ctx context.Context, _ []byt
}

func (runtime *DockerServerBackend) BuildDockerfileStage(ctx context.Context, baseImage string, opts BuildDockerfileStageOptions, instructions ...InstructionInterface) (string, error) {
panic("not implemented")
logboek.Context(ctx).Error().LogF("Staged build of Dockerfile is not available for Docker Server backend.")
logboek.Context(ctx).Error().LogF("Please either:\n")
logboek.Context(ctx).Error().LogF(" * switch to Buildah backend;\n")
logboek.Context(ctx).Error().LogF(" * or disable staged build by setting `staged: false` for the image in the werf.yaml.\n")
logboek.Context(ctx).Error().LogLn()
return "", fmt.Errorf("staged Dockerfile is not available for Docker Server backend")
}

// ShouldCleanupDockerfileImage for docker-server backend we should cleanup image built from dockerfrom tagged with tempID
Expand Down

0 comments on commit 633ef1f

Please sign in to comment.