providers/docker: docker-attach => docker-logs
This commit is contained in:
parent
54de2e3c6f
commit
da0db72054
|
@ -1,9 +1,9 @@
|
||||||
module VagrantPlugins
|
module VagrantPlugins
|
||||||
module DockerProvider
|
module DockerProvider
|
||||||
module Command
|
module Command
|
||||||
class Attach < Vagrant.plugin("2", :command)
|
class Logs < Vagrant.plugin("2", :command)
|
||||||
def self.synopsis
|
def self.synopsis
|
||||||
"attaches to the output stream of a container"
|
"outputs the logs from the Docker container"
|
||||||
end
|
end
|
||||||
|
|
||||||
def execute
|
def execute
|
||||||
|
@ -12,7 +12,7 @@ module VagrantPlugins
|
||||||
options[:prefix] = true
|
options[:prefix] = true
|
||||||
|
|
||||||
opts = OptionParser.new do |o|
|
opts = OptionParser.new do |o|
|
||||||
o.banner = "Usage: vagrant docker-attach [options]"
|
o.banner = "Usage: vagrant docker-logs [options]"
|
||||||
o.separator ""
|
o.separator ""
|
||||||
o.separator "Options:"
|
o.separator "Options:"
|
||||||
o.separator ""
|
o.separator ""
|
||||||
|
@ -45,7 +45,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
state = machine.state
|
state = machine.state
|
||||||
if state == :host_state_unknown
|
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
|
next
|
||||||
elsif state == :not_created
|
elsif state == :not_created
|
||||||
machine.ui.output(I18n.t("docker_provider.not_created_skip"))
|
machine.ui.output(I18n.t("docker_provider.not_created_skip"))
|
|
@ -22,10 +22,10 @@ module VagrantPlugins
|
||||||
Provider
|
Provider
|
||||||
end
|
end
|
||||||
|
|
||||||
command("docker-attach", primary: false) do
|
command("docker-logs", primary: false) do
|
||||||
require_relative "command/attach"
|
require_relative "command/logs"
|
||||||
init!
|
init!
|
||||||
Command::Attach
|
Command::Logs
|
||||||
end
|
end
|
||||||
|
|
||||||
config(:docker, :provider) do
|
config(:docker, :provider) do
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
en:
|
en:
|
||||||
docker_provider:
|
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: |-
|
||||||
Creating the container...
|
Creating the container...
|
||||||
created: |-
|
created: |-
|
||||||
|
@ -15,6 +11,10 @@ en:
|
||||||
host_machine_starting: |-
|
host_machine_starting: |-
|
||||||
Vagrant will now create or start a local VM to act as the Docker
|
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.
|
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: |-
|
not_created_skip: |-
|
||||||
Container not created. Skipping.
|
Container not created. Skipping.
|
||||||
not_docker_provider: |-
|
not_docker_provider: |-
|
||||||
|
@ -51,7 +51,7 @@ en:
|
||||||
then the machine is not created for that environment.
|
then the machine is not created for that environment.
|
||||||
running: |-
|
running: |-
|
||||||
The container is created and running. You can stop it using
|
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`.
|
kill/destroy it with `vagrant destroy`.
|
||||||
stopped: |-
|
stopped: |-
|
||||||
The container is created but not running. You can run it again
|
The container is created but not running. You can run it again
|
||||||
|
|
Loading…
Reference in New Issue