Docker for Databases

Val Huber

You can use the Docker container for Postgres.

Create Docker

Under Docker Shell:

docker run --name some-postgres -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword -d postgres

later, you can stop it like this:

docker rm -f postgres

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

docker run --name MySQL56 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=Password1 -d mysql: 5.6

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:

su - db2inst1
db2start
db2sampl

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

docker run -d --name Postgres95 -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword postgres:9.5

Connecting

Host name: 192.168.99.100 (usually)

Port: 5432

Database: postgres

User: postgres

Password: mysecretpassword

Chat
What would you like to chat about?
Support
Contact
Call us at 1-800-225-5224
Call us at 1-800-225-5224
Contact Us

Chat with CA

Just give us some brief information and we'll connect you to the right CA ExpertCA sales representative.

Our hours of availability are 8AM - 5PM CST.

All Fields Required

connecting

We're matching your request.

Unfortunately, we can't connect you to an agent. If you are not automatically redirected please click here.

  • {{message.agentProfile.name}} will be helping you today.

    View Profile


  • Transfered to {{message.agentProfile.name}}

    {{message.agentProfile.name}} joined the conversation

    {{message.agentProfile.name}} left the conversation

  • Your chat with {{$storage.chatSession.messages[$index - 1].agentProfile.name}} has ended.
    Thank you for your interest in CA.


    Rate Your Chat Experience.

    {{chat.statusMsg}}

agent is typing