# This Containerfile is used for testing purpose in order to generate an image and be able to test it in a openshift platform.
# It has no other purpose.
# You will have to update to the last sha of the based image.
# The run
# podman build -f tools/docker/test_Containerfile -t <your_image_name> . 
# podman push <image>
# Change the cronjob to use that image rather then the original one.
# Change the imagePullPolicy to Always
# Change  the "command" attribute in the cronjob yaml and add at the end `; sleep 3600`. This will keep alive the pod for an hour
# Check the suspend option, should be false
# Connect to the pod launched by the cronjob.
# Launch for example:
#  source /var/lib/awx/venv/awx/bin/activate
#  python /metrics_utility/manage.py gather_automation_controller_billing_data --dry-run
# tar -xzvf /tmp/00000000-0000-0000-0000-000000000000-*.tar.gz -C /tmp
# cat /tmp/<the_file_your_are_looking_for>

FROM  --platform=linux/amd64 registry.redhat.io/ansible-automation-platform-25/controller-rhel8@sha256:919777713928a849dd1ea550a834ddbe5c363c1d203e7e8bf184ca1f36b3c03c as controller

WORKDIR /metrics_utility

USER root
RUN microdnf install tar
USER 1000850000

COPY ./ .
