vn-docker/image-cache.sh

19 lines
318 B
Bash
Executable File

#!/bin/bash
set -e
MY_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$MY_DIR/image.conf"
image=$1
if [[ -z "$image" ]]; then
echo "Usage: $0 <image>"
exit 1
fi
taggedImage="$registry/$image"
docker image pull "$image"
docker image tag "$image" "$taggedImage"
docker image push "$taggedImage"