Files
md/scripts/push-images.sh
T

30 lines
711 B
Bash
Raw Permalink Normal View History

2024-12-23 19:59:59 +08:00
#!/bin/bash
RELEASE_DIR='./docker';
REPO_NAME='doocs/md'
for app_ver in $RELEASE_DIR/*; do
tag=$(echo $app_ver | cut -b 10-);
if [ -f "$app_ver/Dockerfile.base" ]; then
# Push build assets for downstream re-packaging
2024-12-23 19:59:59 +08:00
docker push $REPO_NAME:$tag-assets
fi
if [ -f "$app_ver/Dockerfile.standalone" ]; then
# Push standalone binary image
2024-12-23 19:59:59 +08:00
docker push $REPO_NAME:$tag
fi
if [ -f "$app_ver/Dockerfile.nginx" ]; then
# Push Nginx-based image
2024-12-23 19:59:59 +08:00
docker push $REPO_NAME:$tag-nginx
fi
if [ -f "$app_ver/Dockerfile.static" ]; then
# Push lipanski/docker-static-website image
2024-12-23 19:59:59 +08:00
docker push $REPO_NAME:$tag-static
fi
done