Skip to content

Commit

Permalink
Merge pull request #754 from adrianschroeter/fix_docker
Browse files Browse the repository at this point in the history
Avoid additional container dependencies when using container alias names
  • Loading branch information
adrianschroeter authored Jan 10, 2022
2 parents 5a7a35b + ebbec6f commit dd8a8c9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Build/Docker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ sub parse {
my $excludedline;
my $vars = {};
my $vars_env = {};
my %as_container;

my @requiredarch;
my @badarch;
Expand Down Expand Up @@ -282,6 +283,8 @@ sub parse {
if ($cmd eq 'FROM') {
shift @args if @args && $args[0] =~ /^--platform=/;
if (@args) {
next if $as_container{$args[0]};
$as_container{$args[2]} = $args[0] if @args > 2 && lc($args[1]) eq 'as';
my $container = $args[0];
if ($container ne 'scratch') {
$container .= ':latest' unless $container =~ /:[^:\/]+$/;
Expand Down

0 comments on commit dd8a8c9

Please sign in to comment.