This project can be used as an example of starting multiple containers that depend on one another to create a database driven application.
npm install
mkdir -p ./data/db
docker-compose up --build
init.sql fileroot:rootSQL tabinit.sql fileGoYou now have output that you should see by navigating your browser to http://localhost:30001
You will notice that the data will be in your local db folder and represents the folder that can be designated for persistant data storage on a installed system
Using docker the resulting containers can be archived and transported to another operating system running Docker like this:
docker image save oaklabs/example-node-mysql mysql node phpmyadmin/phpmyadmin | gzip -c > example-node-mysql.tar.gz
Copy the docker-compose.yml to the remote docker Install and run
docker-compose up --build
On your target docker install with Docker running , you can perform this command to install the containers into a new docker install.
gunzip -c example-node-mysql.tar.gz | docker load
Content type
Image
Digest
Size
24.8 MB
Last updated
over 5 years ago
docker pull oaklabs/example-node-mysql