mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-06-09 08:42:18 -04:00
Build quietly and capture the image hash
At least on macOS combo Catalina + Docker engine 19.03.4 + Docker desktop 2.1.0.4 + vagrant 2.2.6 the original `matches = result.scan(/Successfully built (.+)$/i)` -line fails to generate a match. With this change I can `vagrant up --provider=docker` successfully.
This commit is contained in:
parent
237af1b6aa
commit
8041d0ae78
1 changed files with 2 additions and 2 deletions
|
|
@ -18,8 +18,8 @@ module VagrantPlugins
|
|||
def build(dir, **opts, &block)
|
||||
args = Array(opts[:extra_args])
|
||||
args << dir
|
||||
result = execute('docker', 'build', *args, &block)
|
||||
matches = result.scan(/Successfully built (.+)$/i)
|
||||
result = execute('docker', 'build', '-q', *args, &block)
|
||||
matches = result.scan(/^sha256:([0-9a-f]+)$/i)
|
||||
if matches.empty?
|
||||
# This will cause a stack trace in Vagrant, but it is a bug
|
||||
# if this happens anyways.
|
||||
|
|
|
|||
Loading…
Reference in a new issue