-
Notifications
You must be signed in to change notification settings - Fork 40
Modify way of how use local image as base image #27
Comments
There is actually |
@marc- you should be able to do this: require "chef/provisioning/docker_driver"
with_driver "docker"
machine_image "machine1" do
recipe "my_recipe::1"
machine_options :docker_options => {
:base_image => {
:name => "ubuntu",
:repository => "ubuntu",
:tag => "14.04"
}
}
end
machine_image "machine2" do
recipe "my_recipe::2"
from_image 'machine1'
end |
This will work for this particular case. But what if you need to run machine from local image, which wasn't created with |
Signed-off-by: Maksim Chizhov <maksim.chizhov@gmail.com>
Signed-off-by: Maksim Chizhov <maksim.chizhov@gmail.com>
Modifying my example to make it more clear: require "chef/provisioning/docker_driver"
with_driver "docker"
machine_image "machine" do
recipe "my_cookbook::some_recipe"
machine_options :docker_options => {
:base_image => {
:name => "image_built_from_dockerfile",
:repository => "image_built_from_dockerfile",
:tag => "latest"
}
}
end |
I'm just getting up to speed with all this, so I may be wrong. But my initial analysis is that we should support base images from an existing docker image in a remote repository, or a local repository (from a Dockerfile) or another Because If we want to keep them separate, I think we should get much better documentation about the difference between the \cc @jkeiser |
Not sure if it's good idea to put docker specific options into chef-provisioning specific context. |
Signed-off-by: Maksim Chizhov <maksim.chizhov@gmail.com>
The original issue should be fixed by PR #47. @tyler-ball go ahead and close, or leave open for discussion, as desired. |
Reading more carefully I see that Tyler asked me to close it, so. 😄 |
I was trying to run sequentially creation of two images following way:
But it doesn't work for some reason. Still looking on it.
The text was updated successfully, but these errors were encountered: