Browse Source

Update "naughty-from.sh" to support multi-stage

Tianon Gravi 6 years ago
parent
commit
f6d967242d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      naughty-from.sh

+ 2 - 1
naughty-from.sh

@@ -61,7 +61,8 @@ _arches() {
 _froms() {
 _froms() {
 	bashbrew cat --format '
 	bashbrew cat --format '
 		{{- range .TagEntries -}}
 		{{- range .TagEntries -}}
-			{{- $.DockerFrom . -}}
+			{{- $meta := $.DockerfileMetadata . -}}
+			{{- $meta.Froms | join "\n" -}}
 			{{- "\n" -}}
 			{{- "\n" -}}
 		{{- end -}}
 		{{- end -}}
 	' "$@" | sort -u
 	' "$@" | sort -u