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
|
@ -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 New Issue