问题描述
我试图了解如果选择了Docker配置器,则Vagrant在其VM上安装的是哪个版本(我的具体情况:使用ubuntu / trusty64框)。
特别地,我希望它是一个固定版本,因为它必须反映我的暂存环境。
I am trying to understand which is the version that Vagrant installs on its VM (my specific case: using box ubuntu/trusty64) if a Docker provisioner is selected.In particular, I would like it to be a fixed version since it has to reflect my staging environment.
不幸的是,在中没有提到要安装哪个版本的Docker守护程序。
Unfortunately, in the documentation of the provisioner nothing is mentioned about which version of the Docker daemon will be installed. Same by searching for my question, either on google or on github issues.
有人可以指出我正确的方向/文档吗?
Can somebody point me to the right directions/docs?
推荐答案
基本上,vagrant会尝试安装该仓库中可用的最新版本。您可以在
Basically vagrant will try to install the latest version available from the repo. You can review in the source code
machine.communicate.tap do |comm|
comm.sudo("apt-get update -qq -y")
comm.sudo("apt-get install -qq -y --force-yes curl apt-transport-https")
comm.sudo("apt-get purge -qq -y lxc-docker* || true")
comm.sudo("curl -sSL https://get.docker.com/ | sh")
end
如果您希望安装特定版本,则需要运行在您的docker Provisioner(Provisioner按顺序运行)之前安装Shell Provisioner,并安装要使用的版本
If you prefer to have a specific version installed you would need to run a shell provisioner before your docker provisioner (provisioner are run in order) and install the version you want to work with
这篇关于Vagrant Provisioner上的Docker守护程序版本是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!