This commit is contained in:
24
publish.sh
24
publish.sh
@ -1,8 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# build the gitea.jde.nz/public/bb64:debian-curl docker image
|
||||
docker build -t gitea.jde.nz/public/debian-curl:latest -f Dockerfile .
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
# get date/time in local timezone, format YYYY.MMDD.HHMMSS
|
||||
DATETIME=$(date +%Y.%m%d.%H%M%S)
|
||||
|
||||
"${SCRIPTDIR}/build.sh"
|
||||
|
||||
# iterate through the docker files in format Dockerfile.IMAGE_NAME
|
||||
for dockerfile in Dockerfile.*
|
||||
do
|
||||
# get the image name from the dockerfile
|
||||
image_name="${dockerfile//Dockerfile./}"
|
||||
# tag the image with the latest tag
|
||||
docker tag "$image_name:latest" "gitea.jde.nz/public/$image_name:latest"
|
||||
docker tag "$image_name:latest" "gitea.jde.nz/public/$image_name:$DATETIME"
|
||||
# push the image to the local docker registry
|
||||
docker push -a "gitea.jde.nz/public/$image_name"
|
||||
done
|
||||
|
||||
# push the gitea.jde.nz/public/bb64:debian-curl docker image to the gitea.jde.nz registry
|
||||
docker push gitea.jde.nz/public/debian-curl:latest
|
||||
|
||||
|
Reference in New Issue
Block a user