More explicit logging and 'dockerfile' option support
This commit is contained in:
parent
cbc69f5158
commit
166fe374b6
|
@ -43,14 +43,27 @@ module VagrantPlugins
|
|||
args = machine.provider_config.build_args.clone
|
||||
if machine.provider_config.dockerfile
|
||||
dockerfile = machine.provider_config.dockerfile
|
||||
dockerfile_path = File.join(build_dir, dockerfile)
|
||||
dockerfile_path = build_dir ? File.join(build_dir, dockerfile) : dockerfile
|
||||
|
||||
args.push("--file").push(dockerfile_path)
|
||||
if build_dir
|
||||
machine.ui.output(
|
||||
I18n.t("docker_provider.building_named_dockerfile",
|
||||
file: machine.provider_config.dockerfile))
|
||||
else
|
||||
machine.ui.output(
|
||||
I18n.t("docker_provider.building_git_repo_named_dockerfile",
|
||||
file: machine.provider_config.dockerfile,
|
||||
repo: git_repo))
|
||||
end
|
||||
else
|
||||
if build_dir
|
||||
machine.ui.output(I18n.t("docker_provider.building"))
|
||||
else
|
||||
machine.ui.output(
|
||||
I18n.t("docker_provider.building_git_repo",
|
||||
repo: git_repo))
|
||||
end
|
||||
end
|
||||
|
||||
image = machine.provider.driver.build(
|
||||
|
|
|
@ -12,8 +12,12 @@ en:
|
|||
Build image no longer exists. Rebuilding...
|
||||
building: |-
|
||||
Building the container from a Dockerfile...
|
||||
building_git_repo: |-
|
||||
Building the container from the git repository: %{repo}...
|
||||
building_named_dockerfile: |-
|
||||
Building the container from the named Dockerfile: %{file}...
|
||||
building_git_repo_named_dockerfile: |-
|
||||
Building the container from the named Dockerfile: %{file} in the git repository: %{repo}...
|
||||
creating: |-
|
||||
Creating the container...
|
||||
created: |-
|
||||
|
|
Loading…
Reference in New Issue