You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, docker images -q only outputs the short (truncated) image ID without the --no-trunc argument, hence there was no match for the full image ID cached on .vagrant/machines/default/docker/docker_build_image
Docker output
$docker image ls -q
302d1cb135c3
...
$docker image ls -q --no-trunc
sha256:302d1cb135c325ea41b8e1a748af44119be535ee88431274a2d4d8265b45ae0d
...
$vagrant up
Bringing machine 'default' up with 'docker' provider...
==> default: Creating and configuring docker networks...
==> default: Build image no longer exists. Rebuilding...
==> default: Building the container from the named Dockerfile: Dockerfile...
Expected behavior
Skip rebuild when image already exists
Vagrant version
Vagrant 2.4.1
Host operating system
macOS Sonoma ARM64
Docker version 24.0.6
Vagrantfile
Vagrant.configure("2") do |config|
config.vm.provider "docker" do |d|
d.build_dir = "."
d.dockerfile = "Dockerfile"
d.remains_running = false
end
end
The text was updated successfully, but these errors were encountered:
Vagrant is always rebuilding existing image on my machine.
Likely this is caused by a bug here. Which attempts search for an existing image ID from the command
docker images -q
vagrant/plugins/providers/docker/driver.rb
Lines 127 to 130 in d8fdc50
However,
docker images -q
only outputs the short (truncated) image ID without the--no-trunc
argument, hence there was no match for the full image ID cached on.vagrant/machines/default/docker/docker_build_image
Docker output
File content
.vagrant/machines/default/docker/docker_build_image
Debug output
Expected behavior
Skip rebuild when image already exists
Vagrant version
Vagrant 2.4.1
Host operating system
macOS Sonoma ARM64
Docker version 24.0.6
Vagrantfile
The text was updated successfully, but these errors were encountered: