#!/bin/bash
#
# Copyright (c) 2019-2021 Oracle and/or its affiliates. All rights reserved.
# Licensed under the GNU General Public License Version 3 as shown at https://www.gnu.org/licenses/gpl-3.0.txt.

IMAGE=container-registry.oracle.com/olcne/nginx:1.17.7

if [ -f "/etc/olcne-nginx/image" ]; then
	. "/etc/olcne-nginx/image"
fi

# This pull may fail for a variety of reasons, some of which
# deserve to cause the service to fail and some that don't.
# The first case is dealt with when the actual container
# fails to start.  The second is dealt with by ensuring
# this script exits 0.
podman image exists ${IMAGE} || crictl pull ${IMAGE}
exit 0
