Skip to content

Commit 2ff16d5

Browse files
committed
Fix ArchLastStageFrom with oci-import builder
Before: ```console $ bashbrew cat --format '{{ .ArchLastStageFrom arch .TagEntry }}' ubuntu:latest failed executing template for repo "ubuntu:latest" template: --format:1:3: executing "--format" at <.ArchLastStageFrom>: error calling ArchLastStageFrom: runtime error: index out of range [-1] ``` After: ```console $ bashbrew cat --format '{{ .ArchLastStageFrom arch .TagEntry }}' ubuntu:latest scratch ```
1 parent 5152c0d commit 2ff16d5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/bashbrew/docker.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ var dockerfileMetadataCache = map[string]*dockerfileMetadata{}
5555
func (r Repo) archDockerfileMetadata(arch string, entry *manifest.Manifest2822Entry) (*dockerfileMetadata, error) {
5656
if builder := entry.ArchBuilder(arch); builder == "oci-import" {
5757
return &dockerfileMetadata{
58+
StageFroms: []string{
59+
"scratch",
60+
},
5861
Froms: []string{
5962
"scratch",
6063
},

0 commit comments

Comments
 (0)