This repository contains automatic scripts for spinning up a Docker image containing some common DBMS systems pre-installed. Container utilizes Ubuntu linux operating system. The build script can be used to build the container and the run script to run the container and to login into the container, so that you can use any database from the container.
All databases and scripts are contained inside one Ubuntu virtual machine for easy usage.
This repository is meant for developing with the databases or learning the given databases, not for production deployment.
The pre-installed DBMS systems are listed below:
- MariaDB
- SQLite 3
- Redis (redis-cli and redis-server)
- MongoDB
- Neo4j (& Neo4j browser)
Additional software / libraries installed:
- MyCLI
- Python3
These scripts should work with any Unix system. The scripts have been tested to work at least with with Windows 10 (WSL) running Ubuntu 20.04 and MacOS (Arm).
In order to get everything running, following steps will need to be completed:
- Install Docker (if not already installed)
- Download this repository to your computer
- Build the image
- Run the container
You need to first start by installing Docker, if you have not yet installed that. It is recommended to install the Docker Desktop software, as that pre-configures everything.
First, download this repository to somewhere on your computer. You can either clone this repository or download this repository as a zip file.
To build the image, navigate to the folder where you cloned or downloaded this repository and:
- Give run permissions to the build script by running
chmod +x build
- Run the script with command
./build
. It will then ask if you are sure, press Y to proceed building the image.
Optionally, in non-Unix environments, the commands inside the
build
script could be run individually one by one, instead of running the file.
After the image has been built, you only need to run the container. Building the image again would delete any changes or data you have stored inside the container.
To run the docker container:
- You need to also give run permissions to the run script first by running
chmod +x run
. - Now, just run the script with
./run
.
Now at this point, you only need to run the container by running the command ./run
. No need to run the build script anymore.
To exit out from the container, just use the command exit
.
Optionally, in non-Unix environments, the commands inside the
run
script could be run individually one by one, instead of running the file.
To connect to a already running container run the command
docker exec -it databasecourse /bin/bash
Inside the container you can also find a file called help.txt
in your home directory. View that file to view what commands can you use to use the pre-installed DBMS systems.