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?
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.
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?