chef-provisioning-docker
chef-provisioning-docker copied to clipboard
Weird :from_image value stored in machine_image.reference
Related to #27 (which was closed as part of #47) we have a very confusing attribute we store in the machine_spec.reference
. We store :from_image
as a boolean, but that is also accepted as an attribute in the machine
and machine_image
resources. This is confusing to users - they don't know whether to specify :from_image
in the docker options or from_image
as a resource attribute.
There are a couple scenarios we need to support:
- Creating docker images from a public repository, currently done through the
:base_image
docker options. - Creating docker images from a local repository (via a Dockerfile, for example). This should work now through the
:base_image
docker options. - Creating docker images from other
machine_image
resources.
Whatever we do, it needs to be backwards compatible unless we wait to make this change until we move to the next major patch version (undesirable to wait that long).
The only time :from_image
is referenced is to determine whether we converge the machine or not. I'm currently not sure why this is necessary. Is it because we assume Chef isn't installed on an existing Docker container?
\cc @jkeiser @marc- @randomcamel