This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the official Liquibase Docker image repository that builds and publishes Docker images for both Liquibase Community and Liquibase Secure editions. The repository contains:
- Dockerfile: Standard Liquibase Community image
- DockerfileSecure: Liquibase Secure image (enterprise features)
- Dockerfile.alpine: Alpine Linux variant (lightweight)
- Examples: Database-specific extensions (AWS CLI, SQL Server, PostgreSQL, Oracle)
- Docker Compose: Complete example with PostgreSQL
Images are published to multiple registries:
- Docker Hub:
liquibase/liquibase(Community) andliquibase/liquibase-secure(Secure) - GitHub Container Registry:
ghcr.io/liquibase/liquibase* - Amazon ECR Public:
public.ecr.aws/liquibase/liquibase*
The repository uses distinct tagging strategies for Community and SECURE releases to prevent conflicts:
Community Releases (from liquibase-release workflow):
- Git tag:
v{version}(e.g.,v5.0.1) - GitHub Release:
v{version} - Docker images:
liquibase/liquibase:{version},liquibase/liquibase:{major.minor},liquibase/liquibase:latest
SECURE Releases (from liquibase-secure-release workflow):
- Git tag:
v{version}-SECURE(e.g.,v5.0.1-SECURE) - GitHub Release:
v{version}-SECURE - Docker images:
liquibase/liquibase-secure:{version},liquibase/liquibase-secure:{major.minor},liquibase/liquibase-secure:latest
This ensures that Community and SECURE releases maintain separate version histories and do not create conflicting tags in Git or GitHub releases.
# Build Community image
docker build -f Dockerfile -t liquibase/liquibase:latest .
# Build Secure image
docker build -f DockerfileSecure -t liquibase/liquibase-secure:latest .
# Build Alpine variant
docker build -f Dockerfile.alpine -t liquibase/liquibase:latest-alpine .# Test Community image
docker run --rm liquibase/liquibase:latest --version
# Test Secure image (requires license)
docker run --rm -e LIQUIBASE_LICENSE_KEY="your-key" liquibase/liquibase-secure:latest --version
# Run with example changelog
docker run --rm -v $(pwd)/examples/docker-compose/changelog:/liquibase/changelog liquibase/liquibase:latest --changelog-file=db.changelog-master.xml validate# Run complete example with PostgreSQL
cd examples/docker-compose
docker-compose up
# Use local build for testing
docker-compose -f docker-compose.local.yml up --build
# Run with Liquibase Secure
docker-compose -f docker-compose.secure.yml up- Base: Eclipse Temurin JRE 21 (Jammy)
- User: Non-root
liquibaseuser (UID/GID 1001) - Working Directory:
/liquibase - Entrypoint:
docker-entrypoint.shwith automatic MySQL driver installation
- Liquibase: Database migration tool (Community: GitHub releases, Secure: repo.liquibase.com)
- LPM: Liquibase Package Manager for extensions
- Default Config:
liquibase.docker.propertiessets headless mode - CLI-Docker Compatibility: Auto-detects
/liquibase/changelogmount and changes working directory for consistent behavior
- Liquibase versions are controlled via
LIQUIBASE_VERSION(Community) andLIQUIBASE_PRO_VERSION(Secure) ARGs - SHA256 checksums are validated for security
- LPM version is specified via
LPM_VERSIONARG
LIQUIBASE_COMMAND_URL: JDBC connection stringLIQUIBASE_COMMAND_USERNAME: Database usernameLIQUIBASE_COMMAND_PASSWORD: Database passwordLIQUIBASE_COMMAND_CHANGELOG_FILE: Path to changelog file
LIQUIBASE_LICENSE_KEY: Required for Secure featuresLIQUIBASE_PRO_POLICY_CHECKS_ENABLED: Enable policy checksLIQUIBASE_PRO_QUALITY_CHECKS_ENABLED: Enable quality checks
INSTALL_MYSQL=true: Auto-install MySQL driver at runtimeLIQUIBASE_HOME=/liquibase: Liquibase installation directoryDOCKER_LIQUIBASE=true: Marker for Docker environmentSHOULD_CHANGE_DIR: Override automatic working directory detection (true/false). When set, prevents the entrypoint from guessing whether to change to/liquibase/changelogdirectory based on command arguments
FROM liquibase/liquibase:latest
RUN lpm add mysql --globalFROM liquibase/liquibase-secure:latest
ENV LIQUIBASE_LICENSE_KEY=your-license-keyFROM liquibase/liquibase:latest
USER root
RUN apt-get update && apt-get install -y awscli
USER liquibaseThe pom.xml is minimal and used for build processes. The repository primarily uses Docker for builds rather than Maven.