Skip to content

sergeymakinen/docker-test-db

Repository files navigation

Test Database Dockerfiles

This repository contains Dockerfiles of various SQL DBMSes optimized for testing for Docker's automated build published to Docker Hub.

Build Type Total Stars Total Pulls License

Supported tags and respective Dockerfile links

Installation

  1. Install Docker.

  2. Download automated build from Docker Hub:

docker pull sergeymakinen/test-db:tag

How to use the CUBRID image

Start an instance

docker run --name some-cubrid -p 33000:33000 -d sergeymakinen/test-db:cubrid-9.3

Start with persistent storage

docker run --name some-cubrid -p 33000:33000 -t ./data:/var/lib/cubrid -d sergeymakinen/test-db:cubrid-9.3

Connect to it

Parameter Default value Environment variable
Host localhost
Port 33000
User ID docker $CUBRID_USER
Password docker $CUBRID_PASSWORD
Database docker $CUBRID_DB

How to use the MS SQL image

Start an instance

docker run --name some-mssql -p 1433:1433 -d sergeymakinen/test-db:mssql-17.0

Connect to it

Parameter Default value Environment variable
Host localhost
Port 1433
User ID docker $MSSQL_USER
Password docker $MSSQL_PASSWORD
Database docker $MSSQL_DB

How to use the MySQL image

Start an instance

docker run --name some-mysql -p 3306:3306 -d sergeymakinen/test-db:mysql-5.1

Start with persistent storage

docker run --name some-mysql -p 3306:3306 -t ./data:/var/lib/mysql -d sergeymakinen/test-db:mysql-5.1

Connect to it

Parameter Default value Environment variable
Host localhost
Port 3306
User ID docker $MYSQL_USER
Password docker $MYSQL_PASSWORD
Database docker $MYSQL_DB

How to use the Oracle image

Start an instance

docker run --name some-oracle -p 1521:1521 -d sergeymakinen/test-db:oracle-11.2

Start with persistent storage

docker run --name some-oracle -p 1521:1521 -t ./data:/u01/app/oracle -d sergeymakinen/test-db:oracle-11.2

Connect to it

Parameter Default value Environment variable
Host localhost
Port 1521
SID xe
User ID docker $ORACLE_USER
Password docker $ORACLE_PASSWORD
Schema docker $ORACLE_DB

How to use the PostgreSQL image

Start an instance

docker run --name some-postgresql -p 5432:5432 -d sergeymakinen/test-db:postgresql-9.3

Start with persistent storage

docker run --name some-postgresql -p 5432:5432 -t ./data:/var/lib/postgresql/data -d sergeymakinen/test-db:postgresql-9.3

Connect to it

Parameter Default value Environment variable
Host localhost
Port 5432
User ID docker $POSTGRES_USER
Password docker $POSTGRES_PASSWORD
Database docker $POSTGRES_DB