chef-boneyard / knife-container

DEPRECATED: Container support for Chef's Knife Command
Apache License 2.0
57 stars 11 forks source link

Use data bags with local mode #27

Closed randeffects closed 10 years ago

randeffects commented 10 years ago

I have a library cookbook that uses some data from a data bag on our Chef server. My base OS image includes recipes from this library cookbook. I would like to use local mode when building a container image since it is faster. If I use Chef serer mode it works just fine. An assumption is that the chef-repo and cookbooks are stored locally as well on my build machine. I don't see support for data bags using local mode in the code. Am I using the wrong approach? Was the omission of data bag support in local mode intentional?

tduffield commented 10 years ago

The omission of data_bags was not intentional. You should be able to copy the data_bags directory into your chef/ manually for it to work until such a time that they are automatically copied over.