Web application to track books present in the library.
- Build docker image using Dockerfile.
library-ms
is image name.sudo docker build . -t library-ms
- Verify if the image has been successfully built. Below command lists all the images available on docker host.
sudo docker images
- Run the docker compose file. Docker compose file uses the image we built in the previous step.
sudo docker-compose up
- Run
sudo docker ps
and copy the container ID of the library app. - Run the following command to access the container shell.
sudo docker exec -it <container ID> /bin/bash
- Once you are inside the folder /opt/app/. Run the command to create database tables.
flask db upgrade
- On the terminal where you have run docker compose up it will show you the IP on which application can be accessed.
- Open the IP in your browser. To access the web application.
sudo docker run -dp 127.0.0.1:5000:5000 --name=library-app --mount type=volume,src=library-db,target=/opt/app/ library-ms
NOTE App contains of some more pages like Book Details Page, Issue Book, Return Book, Payment Details, Make Payments etc pages. Screenshot of all the pages is not added here.