From 46ba43e6ac637a9eb36a318743093c62eb18c3bd Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Fri, 13 Dec 2013 22:56:13 -0200 Subject: [PATCH] provisioners/docker: Display warning in case a version get specified on the Vagrantfile and the guest is a RedHat-ian guest [GH-2649] --- plugins/provisioners/docker/cap/redhat/docker_install.rb | 4 ++++ templates/locales/en.yml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/plugins/provisioners/docker/cap/redhat/docker_install.rb b/plugins/provisioners/docker/cap/redhat/docker_install.rb index 70347b4a4..a7374696d 100644 --- a/plugins/provisioners/docker/cap/redhat/docker_install.rb +++ b/plugins/provisioners/docker/cap/redhat/docker_install.rb @@ -4,6 +4,10 @@ module VagrantPlugins module Redhat module DockerInstall def self.docker_install(machine, version) + if version != :latest + machine.ui.warn(I18n.t("vagrant.docker_install_with_version_not_supported")) + end + machine.communicate.tap do |comm| if ! comm.test("rpm -qa | grep epel-release") comm.sudo("rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm") diff --git a/templates/locales/en.yml b/templates/locales/en.yml index 87bfcdc11..abf9a4da4 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -55,6 +55,9 @@ en: docker_auto_start_not_available: |- Unable to configure automatic restart of Docker containers on the guest machine + docker_install_with_version_not_supported: |- + Vagrant is not capable of installing an specific version of Docker + onto the guest machine and the latest version will be installed. plugin_needs_reinstall: |- The following plugins were installed with a version of Vagrant that had different versions of underlying components. Because