Skip to content

Commit abc7fde

Browse files
committed
add a script to do retag latest tag
1 parent bc1f770 commit abc7fde

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

bin/retag_latest.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
echo 'Pull alpine image.'
4+
docker pull chusiang/ansible-jupyter:alpine-3.4
5+
echo
6+
7+
echo 'Tag alpine image to latest.'
8+
docker tag chusiang/ansible-jupyter:alpine-3.4 chusiang/ansible-jupyter:latest
9+
echo
10+
11+
echo 'Push the latest tag.'
12+
docker push chusiang/ansible-jupyter:latest
13+
echo
14+
15+
echo 'Remove old image.'
16+
docker rmi $(docker images | grep 'chusiang/ansible-jupyter' | grep '<none>' | awk '{ print $3 }')

0 commit comments

Comments
 (0)