This repository contains the dockerized version of my java project using spring boot framework and mongoDB
I will be attaching the docker commands below and the steps to setup the architecture.
-
start docker daemon with docker desktop (windows)
-
docker pull mongo:3.6(mongo:version)
-
docker images -> verify images is pulled
-
docker run -d -p 27017:27017 --name ummahskitchendb mongo:3.6
create docker file in root directory
go to root directory in cmd
-
docker image build -t ummahskitchen .
-
docker run -p 8080:8080 --name ummahskitchen --link ummahskitchendb:mongo -d ummahskitchen
docker logs (conatiner name)
docker rm -f ummahskitchendb
After getting comfortable with Dockerfile we can start using the docker-compose file -> mentioned in the project root directory