chef-provisioning-docker icon indicating copy to clipboard operation
chef-provisioning-docker copied to clipboard

Weird :from_image value stored in machine_image.reference

Open tyler-ball opened this issue 9 years ago • 0 comments

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:

  1. Creating docker images from a public repository, currently done through the :base_image docker options.
  2. Creating docker images from a local repository (via a Dockerfile, for example). This should work now through the :base_image docker options.
  3. 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

tyler-ball avatar Jun 09 '15 00:06 tyler-ball