What is the docker daemon version on Vagrant provi

2019-08-02 01:14发布

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.

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?

1条回答
戒情不戒烟
2楼-- · 2019-08-02 01:33

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

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

查看更多
登录 后发表回答