Docker for Databases

by March 11, 2018

You can use the Docker container for Postgres.

Create Docker

Under Docker Shell:

later, you can stop it like this:

Important! Docker containers are code only – no persistence. This database loses all data, including tables, when you stop the container. It is therefore useful for demos and experiments, but not for production.

Connect with CA Live API Creator

Connect like this:

Docker Database Images

MySQL

Versions available: 5.5, 5.6, 5.7

Connecting

Host name: 192.168.99.100 (usually)

Port: 3306

User: root

Password: Password1

DB2

DB2 is different. You have to run a few manual commands. Leave the terminal open.

Version 10.5:
—————————————-

docker run –name DB2_10 -i -t -p 50000:50000 -e DB2INST1_PASSWORD=expresso123 -e L
ICENSE=accept ibmcom/
db2express-c:latest
bash

—————————————-

Then:

Connecting

Host name: 192.168.99.100 (usually)

Port: 3306

User: db2inst1

Password: expresso123

Database: SAMPLE

Oracle

Version 11gdocker run -d -p 1521:1521 wnameless/oracle-xe-11g

Connecting

Host name: 192.168.99.100 (usually)

Port: 1521

SID: xe

User: system

Password: oracle

PostgreSQL

Versions available: 9.1, 9.2, 9.3, 9.4, 9.5

Connecting

Host name: 192.168.99.100 (usually)

Port: 5432

Database: postgres

User: postgres

Password: mysecretpassword