Skip to content

Set up a quick database using docker 🐳 (MongoDB + MariaDB)

License

Notifications You must be signed in to change notification settings

AlberErre/docker-quick-databases

Repository files navigation

Quick databases using Docker containers

Just run a docker container and play with the data!

MongoDB Docker_MongoDB

Configuration - MongoDB

You need to modify MongoDB/run.sh, pointing it to your local storage - e.g. Mac OSX local machine /Users/mongodb

docker run -p 27017:27017 -d -v /Users/mongodb:/data/db mongo

If you are on MacOS, this config is ready to go!

Running Docker

mkdir /Users/mongodb

git clone https://github.com/AlberErre/docker-quick-databases.git
cd docker-quick-databases/MongoDB
bash run.sh

Note: use sudo if needed.

If everything was ok, you should have a docker container running in the background. To ensure it's running just use:

docker ps

Check if MongoDB is running correctly on its port

netstat ao | grep 27017

Interacting with your database

You can use Robo 3T to interact with your database, run queries, etc.

Kill your MongoDB docker container

docker kill DOCKER_UUID

MariaDB

Docker_MariaDB

Configuration - MariaDB

You need to modify MariaDB/run.sh, pointing it to your local storage - e.g. Mac OSX local machine /Users/mariadb

docker run -e MYSQL_ROOT_PASSWORD=1234 -d -p 3333:3306 -v /Users/mariadb:/var/lib/mysql mariadb

If you are on MacOS, this config is ready to go!

Running Docker

mkdir /Users/mariadb

git clone https://github.com/AlberErre/docker-quick-databases.git
cd docker-quick-databases/MariaDB
bash run.sh

Note: use sudo if needed.

If everything was ok, you should have a docker container running in the background. To ensure it's running just use:

docker ps

Interacting with your database

You can use SQLElectron to interact with your database, run queries, etc.

Config SQLElectron example

SQLElectron config example (Mac OS)

Kill your MariaDB docker container

docker kill DOCKER_UUID

Happy shipping!

About

Set up a quick database using docker 🐳 (MongoDB + MariaDB)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages