Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xenit-eu/docker-jdbc-drivers


https://github.com/xenit-eu/docker-jdbc-drivers

Last synced: 6 days ago
JSON representation

Awesome Lists containing this project

README

        

# docker-jdbc-drivers

[![Build Status](https://jenkins-2.xenit.eu/buildStatus/icon?job=Xenit+Github%2Fdocker-jdbc-drivers%2Fmaster)](https://jenkins-2.xenit.eu/job/Xenit%20Github/job/docker-jdbc-drivers/job/master/)
[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0)

Docker image with JDBC drivers, so you can switch to an alternative JDBC driver at runtime.

## Building and resulting images

When the master branch is built on Jenkins,
the resulting images are published to Docker Hub under the following image names:
* [xenit/jdbc-mysql](https://hub.docker.com/r/xenit/jdbc-mysql)
* [xenit/jdbc-mariadb](https://hub.docker.com/r/xenit/jdbc-mariadb)

Building locally produces images with the same name on your system but does not push them.
You can do this with the `./gradlew buildDockerImage` task.

## Usage

You can use these images in docker-compose setups like the example below.
It shares a `jdbc` volume between the `alfresco` and the `jdbc-driver` service.
This volume is referred to in the custom environment variables of the `alfresco` service.

```
version: '2.1'

services:
alfresco:
volumes:
- jdbc:/jdbc/
environment:
- DB_URL=jdbc:mysql://database/alfresco?useUnicode=yes\&characterEncoding=UTF-8
- JAVA_OPTS_JDBC_DRIVER=-Dtomcat.common.loader.append=/jdbc/*.jar

database:
image: mariadb:10.1
volumes:
- mariadb:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_USER=alfresco
- MYSQL_PASSWORD=admin
- MYSQL_DATABASE=alfresco

jdbc-driver:
image: xenit/jdbc-mariadb:2.2.5
volumes:
- jdbc:/jdbc/

volumes:
mariadb:
jdbc:
```