The Dockerfile can be found in the maindirectory of your operator project. For Certified Operator Images Dockerfile requirements are as follows:
You must configure the required labels (name, maintainer, vendor, version, release, summary)
Software license(s) must be included within the image.
Although typically labels and licenses are not required to successfully build a running image, they are required for the Red Hat build service and scanner.
Below is an example Dockerfile for a Helm Operator which includes the aforementioned requirements:
Dockerfile
# Build the manager binaryFROMregistry.redhat.io/openshift4/ose-helm-operator:v4.7### Required OpenShift LabelsLABELname="Wordpress Operator" \vendor="Bitnami" \version="v0.0.1" \release="1" \summary="This is an example of a wordpress helm operator." \description="This operator will deploy wordpress to the cluster."# Required LicensesCOPYlicenses/licensesENVHOME=/opt/helmCOPYwatches.yaml ${HOME}/watches.yamlCOPYhelm-charts ${HOME}/helm-chartsWORKDIR ${HOME}
A few things to note about the Dockerfile above:
The default FROM line produced by the SDK needs to be replaced with the line listed above.
This Dockerfile contains all of the required labels. These labels must be manually added (name, vendor, version, release, summary, and description).
This Dockerfile also references a licenses/ directory, which needs to be manually added to the root of the project. This directory must include the software license(s) of your project.
Your project directory structure should look similar to the hierarchy below. Note the location of the licenses directory.