Ann: Building OCI images for Chef-Zero Policyfile installations

Hi,
We've decided to open source a part of our build infrastructure. Specifically, the creation of 'base' container images that are, in turn, used to build images from Policyfiles using Chef Zero.

The code is dual MIT + Apache 2.0 licensed, and is available here:

TLDR;

Place Policyfiles in ./policyfiles.
Place Chef cookbooks in ./cookbooks.
Use the following as your ./Dockerfile:

FROM yelgeb/chef-zero-4.8:2.1.1

ENV POLICY_NAME=yours

## Install as defined in policyfiles/${POLICY_NAME}.rb
#
COPY cookbooks /opt/chef-repo/cookbooks
COPY policyfiles /opt/chef-repo/policyfiles

RUN zero.sh \
    && uninstall-chef.sh \
    && rm -rf /usr/local/bin/zero.sh \
    && rm -rf /usr/local/bin/uninstall-chef.sh \
    && apt-cleanup.sh

We used to employ Knife and Knife-Zero some time back, but then switched to Policyfiles.
At that time we also switched to building OCI images using Chef cookbooks.

PR's welcome.

Hope this helps?

Kind regards
Begley Brothers Inc.