Closed tknerr closed 1 year ago
I have to add that I have vagrant-cachier globally (and transparently) enabled via my global ~/.vagrant.d/Vagrantfile
:
Vagrant.configure("2") do |config|
# enable cachier globally
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
end
end
That's why cachier is enabled in the first place.
I like that approach because it's totally transparent. However, as you see it bails out when I use build_dir
in the example above.
Shouldn't the docker VM that uses build_dir be:
Vagrant.configure(2) do |config| config.vm.provider "docker" do |d| config.cache.enable = false d.build_dir = "." # Dockerfile right here end end
There are references on https://github.com/fgrehm/vagrant-cachier/blob/master/lib/vagrant-cachier/config.rb regarding the a disable! and the enabled value.
Also, if ALLOWED scope had a NONE value, that could be checked and if scope was NONE, then that could be used to trigger a "soft" disable.
Hey, sorry for the silence here but this project is looking for maintainers :sweat_smile:
As per https://github.com/fgrehm/vagrant-cachier/issues/193, I've added the ignored
label and will close this issue. Thanks for the interest in the project and LMK if you want to step up and take ownership of this project on that other issue :wave:
Given a Vagrantfile like this:
When I
vagrant up
, cachier bails out hard with an exception:Well, it says clearly "Cachier plugin only supported with docker provider when image is used (RuntimeError)". Well, I didn't use
image
butbuild_dir
instead.So clearly it's my fault, but wouldn't it be possible to disable the bucket / cachier instead of throwing an exception here?