I have trouble configuring chefworkstation running in a docker container for use in jenkins pipeline.
I managed to configure knife using a .chef folder in the docker working directory, but chef commands are not working (and I need those for installing & pushing policies)
you need to do something like this to make the .chef folder accessible to the workspace as jenkins isolates workloads to a workspace folder for security reasons.
Thanks for your response!
I had a mapping to the .chef folder, but chef install commands download the cookbooks to .chefdk/cache. As I split up the chef install and chef push commands in separate Jenkins steps (using docker run --rm commands) I lost the installed (downloaded) cookbooks between steps. I added a volume mapping to .chefdk and all lights went green.
Glad we agree!