diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..1227d72 --- /dev/null +++ b/build.sh @@ -0,0 +1,19 @@ +#!/bin/bash +export DATE=$(date '+%Y-%m-%d') +export IMAGENAME=totp-docker +export OLDDATE=$(cat .build) + +#docker stop officeproxy +#docker rm officeproxy +docker rmi registry.ghostklart.com/dtibragimov/$IMAGENAME:$OLDDATE -f + +git commit -am "$DATE" +git push + +touch .build +echo $DATE > .build + +docker build -t registry.ghostklart.com/dtibragimov/$IMAGENAME:$DATE . +docker tag registry.ghostklart.com/dtibragimov/$IMAGENAME:$DATE registry.ghostklart.com/dtibragimov/$IMAGENAME:latest +echo "y" | docker system prune +docker push registry.ghostklart.com/dtibragimov/$IMAGENAME -a diff --git a/totp.sh b/totp.sh index fd74c65..2cd2185 100644 --- a/totp.sh +++ b/totp.sh @@ -2,4 +2,4 @@ read -p "Secret name: " SECRET -docker exec -it totp-docker totp $SECRET \ No newline at end of file +docker exec -it totp-docker totp $SECRET