1.8.1
Ubuntu trusty (14.04LTS)
Ubuntu trusty (14.04LTS)
Vagrant should install docker without exploding when following the recommendations in the docker provisioner documentation, namely that the best way to configure your docker is to populate /etc/default/docker prior to running the docker provisioner.
Kaboom! Fails on prompt as to what to do with the existing vs new /etc/default/dockers.
...tail end of vagrant up:
+ sh -c sleep 3; apt-get update; apt-get install -y -q docker-engine
Configuration file '/etc/default/docker'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** docker (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package docker-engine (--configure):
EOF on stdin at conffile prompt
Errors were encountered while processing:
docker-engine
E: Sub-process /usr/bin/dpkg returned an error code (1)
/etc/default/docker as the provisioner docs recommend.vagrant upHi @RsrchBoy
Can you please share your complete Vagrantfile as well as the output of the command in debug mode as a GitHub gist?
It's more a dpkg behavior asking if you want to keep the current /etc/default/docker or overwrite it.
I have a workaround for that.
Create a file containing the following code and copy it at /etc/apt/apt.conf.d/local (for Ubuntu/trusty64 guest OS):
Dpkg::Options {
"--force-confdef";
"--force-confold";
}
Sample Vagrantfile for reproducing the issue (Setting the http_proxy):
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision "shell", inline:"echo export http_proxy=$http_proxy >> /etc/default/docker"
config.vm.provision "docker" do |d|
d.run "ubuntu",
cmd: "bash -l",
args: "-v '/vagrant:/var/www'"
end
end
Having the exact same problem. My workaround was to run a shell provisioner after docker provisioner, where it stops docker daemon, then runs sed on /etc/default/docker and then starts docker again. Thats was sooo ugly. @achaussende you saved my day!
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
It's more a dpkg behavior asking if you want to keep the current /etc/default/docker or overwrite it.
I have a workaround for that.
Create a file containing the following code and copy it at
/etc/apt/apt.conf.d/local(for Ubuntu/trusty64 guest OS):Sample Vagrantfile for reproducing the issue (Setting the http_proxy):