This commit is contained in:
2025-06-08 17:06:29 +09:00
parent bbae4fa7dd
commit bebf80930d
3 changed files with 128 additions and 24 deletions

30
build-docker-image.sh Normal file → Executable file
View File

@ -1,4 +1,32 @@
#!/bin/bash
set -euo pipefail
# Build Docker image for Voice RSS Summary project
docker build -t voice-rss-summary .
# Usage: ./build-docker-image.sh [tag] [build-args...]
IMAGE_NAME="voice-rss-summary"
TAG="${1:-latest}"
FULL_TAG="${IMAGE_NAME}:${TAG}"
echo "Building Docker image: ${FULL_TAG}"
echo "Build context: $(pwd)"
# Check if Dockerfile exists
if [[ ! -f "Dockerfile" ]]; then
echo "Error: Dockerfile not found in current directory"
exit 1
fi
# Build with build cache and progress output
docker build \
--tag "${FULL_TAG}" \
--progress=plain \
--build-arg BUILDKIT_INLINE_CACHE=1 \
"${@:2}" \
.
# Display image info
echo "\nBuild completed successfully!"
echo "Image: ${FULL_TAG}"
echo "Size: $(docker images --format 'table {{.Size}}' "${FULL_TAG}" | tail -n +2)"
echo "\nTo run the container, use: ./run-docker.sh"