Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Postgresql drivers not found when dockerizing TeamCity

I want to use a Docker image to run TeamCity. But I can't get further than to the database collection when choosing Postgresql. (The built in memory database works fine though.) Apparently, even if I place the jar file containing the driver into the request directory, it is not recognized.

This is how I start the containers:

$ sudo docker run --restart=always -d --name tc-postgres omq_/teamcity-postgres:9.4
$ sudo docker run -d --name tc-server -p 8111:8111 --link tc-postgres:tc-postgreslink ariya/centos6-teamcity-server

This is the error message:

The PostgreSQL JDBC driver is not found in the /data/teamcity/lib/jdbc directory. Download the JDBC41 driver from jdbc.postgresql.org and place it to this directory.

And it remains even after creating lib/jdbc and copying the jar file over like

$ cp postgresql-9.4-1201.jdbc41.jar /var/lib/docker/aufs/mnt/569bab307f99d53e21b584026a15251ab7d5382d2982431558a1a5dac056dfaa/data/teamcity/lib/jdbc

and pushing the Refresh JDBC drivers button Restarting the container makes no difference.

Database connection setup

Ignoring the requirement and entering credentials to proceed results in the error No suitable JDBC driver found for database type: PostgreSQL showing up.

like image 624
Steven Avatar asked Jun 03 '26 03:06

Steven


1 Answers

Mounting the directory (not the file) solved the issue.

docker run -dt -name teamcity_server -p 8111:8111 -v /you/hosts/path/to/the/jdbc:/data/teamcity/lib/jdbc ariya/centos6-teamcity-server
like image 165
Steven Avatar answered Jun 06 '26 05:06

Steven



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!