Archived
1
0
Fork 0
This repository has been archived on 2024-01-27. You can view files and clone it, but cannot push or open issues or pull requests.
dockerfiles/tagNpush.sh
2018-01-03 22:57:14 +01:00

16 lines
343 B
Bash
Executable file

#!/bin/bash
## Tag all the images with a datestamp
## and push them to dockerhub.
datestamp=$(date +%Y%m%d)
for i in $(grep '^ image:' docker-compose.yaml | cut -c12-)
do
echo
echo "======= $i ======="
basename=$(echo $i | cut -d: -f1)
docker tag $basename $basename:$datestamp
docker push $i
docker push $basename:$datestamp
done