diff --git a/plugins/providers/docker/command/attach.rb b/plugins/providers/docker/command/logs.rb similarity index 90% rename from plugins/providers/docker/command/attach.rb rename to plugins/providers/docker/command/logs.rb index 213c726c3..6757a1bbb 100644 --- a/plugins/providers/docker/command/attach.rb +++ b/plugins/providers/docker/command/logs.rb @@ -1,9 +1,9 @@ module VagrantPlugins module DockerProvider module Command - class Attach < Vagrant.plugin("2", :command) + class Logs < Vagrant.plugin("2", :command) def self.synopsis - "attaches to the output stream of a container" + "outputs the logs from the Docker container" end def execute @@ -12,7 +12,7 @@ module VagrantPlugins options[:prefix] = true opts = OptionParser.new do |o| - o.banner = "Usage: vagrant docker-attach [options]" + o.banner = "Usage: vagrant docker-logs [options]" o.separator "" o.separator "Options:" o.separator "" @@ -45,7 +45,7 @@ module VagrantPlugins state = machine.state if state == :host_state_unknown - machine.ui.output(I18n.t("docker_provider.attach_host_state_unknown")) + machine.ui.output(I18n.t("docker_provider.logs_host_state_unknown")) next elsif state == :not_created machine.ui.output(I18n.t("docker_provider.not_created_skip")) diff --git a/plugins/providers/docker/plugin.rb b/plugins/providers/docker/plugin.rb index 18973373f..9902c8101 100644 --- a/plugins/providers/docker/plugin.rb +++ b/plugins/providers/docker/plugin.rb @@ -22,10 +22,10 @@ module VagrantPlugins Provider end - command("docker-attach", primary: false) do - require_relative "command/attach" + command("docker-logs", primary: false) do + require_relative "command/logs" init! - Command::Attach + Command::Logs end config(:docker, :provider) do diff --git a/templates/locales/providers_docker.yml b/templates/locales/providers_docker.yml index 58b717d57..b902255f1 100644 --- a/templates/locales/providers_docker.yml +++ b/templates/locales/providers_docker.yml @@ -1,9 +1,5 @@ en: docker_provider: - attach_host_state_unknown: |- - This container requires a host VM, and the state of that VM - is unknown. Run `vagrant up` to verify that the container and - its host VM is running, then try again. creating: |- Creating the container... created: |- @@ -15,6 +11,10 @@ en: host_machine_starting: |- Vagrant will now create or start a local VM to act as the Docker host. You'll see the output of the `vagrant up` for this VM below. + logs_host_state_unknown: |- + This container requires a host VM, and the state of that VM + is unknown. Run `vagrant up` to verify that the container and + its host VM is running, then try again. not_created_skip: |- Container not created. Skipping. not_docker_provider: |- @@ -51,7 +51,7 @@ en: then the machine is not created for that environment. running: |- The container is created and running. You can stop it using - `vagrant halt`, attach to it with `vagrant docker-attach`, and + `vagrant halt`, see logs with `vagrant docker-logs`, and kill/destroy it with `vagrant destroy`. stopped: |- The container is created but not running. You can run it again