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
Joerg Elfring 9e66475149 init
2017-12-09 16:46:17 +01:00

16 lines
358 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)
echo docker tag $basename $basename:$datestamp
echo docker push $i
echo docker push $basename:$datestamp
done