Database Containerization

Containers are basic execution environments that are sandboxed and contained within sandboxed portions of an operating system. They are very useful for developing, testing and even deploying databases. See containers for details.

Pros and Cons

Pros

Cons

Running MySQL in Docker

You can run various SQL based databases in containers. In this example the MySQL container is run using Docker.

docker run \
--publish 3306:3306 \
--env MYSQL_ROOT_PASSWORD='root' \
--name my-mysql \
--detach \
mysql

Running MongoDB in Docker

Here [MongoDB] is run in a Docker container.

docker run \
--publish 27017:27017
--name some-mongo
--detach \
mongo

References

Note References