komga/build-local-docker.sh
duong.doan1 7750b593f6 refactor: simplify Docker build setup
- Remove all simple Docker files (Dockerfile.simple, Dockerfile.simple-local, build-simple-docker.sh)
- Remove docker-compose.local.yml
- Update docker-compose.yml to use Dockerfile.local for builds
- Update build-local-docker.sh as the single build script
- Keep only multi-stage Dockerfile.local for comprehensive local builds
2026-04-07 18:29:00 +07:00

28 lines
No EOL
858 B
Bash
Executable file

#!/bin/bash
# Build Komga Docker image locally with multi-stage build
set -e
echo "Building Komga Docker image locally..."
# Get version from gradle.properties
VERSION=$(grep 'version=' gradle.properties | cut -d'=' -f2)
echo "Building version: $VERSION"
# Build Docker image with multi-stage build (Node.js 18 + Java 21)
docker build -f Dockerfile.local -t komga-local:$VERSION .
echo ""
echo "Docker image built successfully:"
echo " Image: komga-local:$VERSION"
echo " Build: Multi-stage (Node.js 18 + Java 21)"
echo " Runtime: Java 21 (Temurin JRE)"
echo ""
echo "To run standalone container:"
echo " docker run -p 25600:25600 -v /path/to/config:/config komga-local:$VERSION"
echo ""
echo "To run with docker-compose:"
echo " docker-compose up -d"
echo ""
echo "To tag with different name:"
echo " docker tag komga-local:$VERSION komga:latest"