vagrant/plugins/providers/docker/plugin.rb

59 lines
1.5 KiB
Ruby
Raw Normal View History

module VagrantPlugins
module DockerProvider
autoload :Action, File.expand_path("../action", __FILE__)
autoload :Driver, File.expand_path("../driver", __FILE__)
autoload :Errors, File.expand_path("../errors", __FILE__)
module Executor
autoload :Local, File.expand_path("../executor/local", __FILE__)
autoload :Vagrant, File.expand_path("../executor/vagrant", __FILE__)
end
class Plugin < Vagrant.plugin("2")
name "docker-provider"
2014-03-27 00:04:35 +00:00
description <<-EOF
The Docker provider allows Vagrant to manage and control
Docker containers.
EOF
2014-04-10 16:09:58 +00:00
provider(:docker, box_optional: true, parallel: true) do
require_relative 'provider'
2014-03-27 00:01:34 +00:00
init!
Provider
end
command("docker-logs", primary: false) do
require_relative "command/logs"
init!
Command::Logs
end
config(:docker, :provider) do
require_relative 'config'
2014-03-27 00:01:34 +00:00
init!
Config
end
synced_folder(:docker) do
require File.expand_path("../synced_folder", __FILE__)
SyncedFolder
end
2014-03-27 00:01:34 +00:00
provider_capability("docker", "public_address") do
require_relative "cap/public_address"
Cap::PublicAddress
end
2014-03-27 00:01:34 +00:00
protected
def self.init!
return if defined?(@_init)
I18n.load_path << File.expand_path(
"templates/locales/providers_docker.yml", Vagrant.source_root)
I18n.reload!
@_init = true
end
end
end
end