first commit
This commit is contained in:
22
docker-push.sh
Normal file
22
docker-push.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
!/bin/bash
|
||||
|
||||
image="git.rssa.top/kanzi/dashy"
|
||||
|
||||
#get timestamp for the tag
|
||||
timestamp=$(date +%Y%m%d%H%M%S)
|
||||
|
||||
tag=$image:$timestamp
|
||||
latest=$image:latest
|
||||
|
||||
#build image
|
||||
docker build -t $tag .
|
||||
docker tag $tag $latest
|
||||
|
||||
#push to dockerhub
|
||||
docker login git.rssa.top
|
||||
#sudo docker login -u username -p password
|
||||
docker push $tag
|
||||
docker push $latest
|
||||
|
||||
#remove dangling images
|
||||
docker system prune -f
|
||||
Reference in New Issue
Block a user