This repository contains an interactive web application that tests your Docker knowledge while teaching you essential Docker concepts hands-on. The application consists of:
- Frontend: Interactive quiz interface with randomly selected Docker MCQ questions
- Backend: Node.js Express server handling quiz logic and scoring
- Database: MongoDB for storing player scores and leaderboard data
- Admin UI: Mongo Express for real-time database inspection
Repository Structure:
developing-with-docker/
├── app/
│ ├── server.js # Node.js Express backend server
│ ├── package.json # Node.js dependencies and scripts
│ ├── index.html # Quiz application frontend
│ ├── questions.json # Docker MCQ questions pool
│ └── images/ # Application assets
├── Dockerfile # Instructions to build the app container for the Node.js app
├── docker-compose.yaml # Multi-container orchestration config
├── Tutorial.md # Step-by-step tutorial
└── README.md # This file
The fastest way to get the application running is using Docker Compose, which automates the setup of all services. We can use Docker Compose to build and launch the entire application stack with a single command.
-
Clone the repository (if you are launching the repository through GitHub codespaces, you can skip this step):
git clone <repository-url> cd developing-with-docker
-
Start all services using Docker Compose:
docker-compose up
This single command will:
- Build the Node.js application image from the Dockerfile
- Start MongoDB database container
- Start Mongo Express admin interface
- Create a Docker network for service communication
- Set up persistent volume for database data
- Configure all environment variables and port mappings
Once the services are up and running, you can access:
- Quiz Application:
localhost:3001 - Mongo Express (Database Admin UI):
localhost:20001- Username:
admin - Password:
pass
- Username:
- MongoDB Database:
localhost:20000- Username:
admin - Password:
password
- Username:
Note: If you are using codespaces to launch the application, please navigates to the appropriate URLs with forwarded ports under the "Ports" tab in VSCode.
Testing the application:
- Open the quiz application at localhost:3001
- Answer the randomly selected Docker questions and submit your answers to see your score
- Check the leaderboard to see all submissions
- Visit Mongo Express at localhost:20001 to inspect the stored data
For more detailed explanations, please refer to the Tutorial.md file in this repository.




