A set of popular database systems organized into a single docker compose
stack for testing and development.
Database containers all use docker volumes
and can be started and stopped as required without data loss.
- Docker Desktop or Docker w/
docker-compose
- Oracle Container Registry account (for oracle download)
- Bash
The stack includes the latest Oracle Enterprise
container, which is only available from the Oracle Container Registry.
- Create an OCR account if you don't have one https://container-registry.oracle.com/.
- Create an
Auth Token
from the Sign-in user drop down. - Use the Auth Token as the password for
docker login
:
docker login container-registry.oracle.com
Username: <Your OCR account>
Password: <Auth Token>
Login Succeeded
- Pull the
Oracle Enterprise
Container:
docker pull container-registry.oracle.com/database/enterprise:latest
It is a large container and will take some time to download. Once downloaded the database-stack
can be launched and will include Oracle Enterprise
.
To use without Oracle simply comment out (or remove) the
oracle:
service and relatedvolumes
.
docker compose up -d
- Azure Data Studio has extensions for all of databases in the stack, and it is relatively easy to connect to the database servers.
- There is a
bastion
container runningubuntu 22.04
in thedatabase-stack
, this can be used for working within the docker network and validating connectivity. - All container instances have
/host
mounted to the local./host
folder for easy file exchange, backups, etc. - All services should be available to the host via
localhost
. ForMySQL
connections using127.0.0.1
to avoid connection issues associated with localhost. - For
docker containers
not running in thedatabase-stack_defult
network, services should be available viahost.docker.internal
and the service port. Within a docker containerlocalhost
resolves to the container itself. Services on the host are accessible to the container viahost.docker.internal
. - For Oracle, when connecting use the format:
localhost:1521/<OracleSIDName>
to avoid TNSNAMES related errors and avoid having to setup an Oracle client on the host. - To connect to
Oracle Enterprise Mangager Express
in theoracle
container, from the host, use the url:https://localhost:5500/em
and enter thesys
orsystem
credentials. UseCDB$ROOT
for the Container name.
The kafka-stack
folder contains another docker-compose
stack which connects to the same database-stack_default
network, allowing all containers to communicate using docker service DNS names.
See the kafka-stack
Readme for more information.
Running both the database-stack
and the kafka-stack
will require (and consume) a fair bit of machine resources.
Eg.
Stopping unused services or stacks can be helpful.
The containers all make use of docker volumes to enable stopping and starting without data loss, so make sure to delete all associated stack volumes to fully reset the stack and associated databases.
With the extensions installed Azure Data Studio can connect, query and manage all the databases in the stack: