Files
dashy-test/docker-push.sh
2024-05-02 07:42:34 +07:00

22 lines
404 B
Bash

!/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