diff --git a/Dockerfile b/Dockerfile index 8c8f1d01..3d4ed7fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,9 @@ ARG MAVEN_PROXY_PORT ARG MAVEN_PROXY_USER ARG MAVEN_PROXY_PASSWORD +ARG POSTGRESQL_VERSION +ARG MYSQL_VERSION + ARG JMX_PROMETHEUS_VERSION=0.12.0 RUN apk add --no-cache \ diff --git a/README.md b/README.md index 31cf864e..0d5587d3 100644 --- a/README.md +++ b/README.md @@ -396,6 +396,17 @@ docker build -t camunda-bpm-platform \ --build-arg MAVEN_PROXY_PASSWORD=${PROXY_PASSWORD} \ . ``` +### Override MySQL and PostgreSQL driver versions. +By default, the driver versions are fetched from https://github.com/camunda/camunda-bpm-platform/blob/master/database/pom.xml. That can be overriden by passing `MYSQL_VERSION` and `POSTGRESQL_VERSION` build args + +``` +docker build -t camunda-bpm-platform \ + --build-arg DISTRO=${DISTRO} \ + --build-arg VERSION=${VERSION} \ + --build-arg POSTGRESQL_VERSION=${POSTGRESQL_VERSION} \ + --build-arg MYSQL_VERSION=${MYSQL_VERSION} \ + . +``` ## Use cases diff --git a/download.sh b/download.sh index 812622e5..2d831219 100755 --- a/download.sh +++ b/download.sh @@ -82,8 +82,12 @@ mvn dependency:get -U -B --global-settings /tmp/settings.xml \ -DgroupId="org.camunda.bpm" -DartifactId="camunda-database-settings" \ -Dversion="${ARTIFACT_VERSION}" -Dpackaging="pom" -Dtransitive=false cambpmdbsettings_pom_file=$(find /m2-repository -name "camunda-database-settings-${ARTIFACT_VERSION}.pom" -print | head -n 1) -MYSQL_VERSION=$(xmlstarlet sel -t -v //_:version.mysql $cambpmdbsettings_pom_file) -POSTGRESQL_VERSION=$(xmlstarlet sel -t -v //_:version.postgresql $cambpmdbsettings_pom_file) +if [ -z "$MYSQL_VERSION" ]; then + MYSQL_VERSION=$(xmlstarlet sel -t -v //_:version.mysql $cambpmdbsettings_pom_file) +fi +if [ -z "$POSTGRESQL_VERSION" ]; then + POSTGRESQL_VERSION=$(xmlstarlet sel -t -v //_:version.postgresql $cambpmdbsettings_pom_file) +fi mvn dependency:copy -B \ $PROXY \