providers/docker: docker-attach => docker-logs
This commit is contained in:
parent
54de2e3c6f
commit
da0db72054
|
@ -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"))
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue