Problem scenario
You have a Docker container that supports Chef or some automatic way of installing Chef. The automation is failing at the end because you are being prompted to accept a license. What should you do to be able to invoke Chef commands automatically?
Solution
With the first Chef command, e.g., "chef env", use the "--chef-license accept" option/flag. Here is an example:
chef env --chef-license accept
For more information, see this posting.