A tiny, client‑side web app for rolling one or more six‑sided dice. Built with plain HTML, CSS, and JavaScript. Ships with a Dockerfile for easy deployment.
- Features
- Quick Start (Local)
- Using the App
- Docker
- Project Structure
- Development Notes
- Contributing
- Acknowledgements
- License
- Roll any number of dice (1+)
- Shows results as numbers and images (1–6)
- Zero dependencies; static assets only
- Option 1: Open
index.htmldirectly in your browser - Option 2: Run with Docker
docker run -itd -p 8080:80 amnoorbrar/dice-roller- Visit http://localhost:8080
- Enter how many dice to roll
- Click "Roll Dice"
- View textual results and corresponding images
Build and run using the included Nginx-based image:
# Build
docker build -t dice-roller:latest .
# Run
docker run --rm -p 8080:80 dice-roller:latest
# Open in your browser
# http://localhost:8080The image serves static files from /usr/share/nginx/html.
.
├─ index.html # UI markup
├─ dice_roller.js # Dice roll logic
├─ Dockerfile # Nginx static site image
├─ .dockerignore # Build context excludes
├─ LICENSE # MIT license
├─ README.md # This file
├─ style/
│ └─ style.css # Styles
└─ dice_images/ # Face images 1–6
- Images are loaded from
dice_images/{1..6}.png - No build step required
- Works offline; all logic runs in the browser
Contributions are welcome. Please follow these steps:
- Fork the repository.
- Create a feature branch off
develop(e.g.,feature/your-topic). - Commit your changes with clear messages.
- Add your GitHub Username in the Acknowledgements in this format
[GitHub Username](GitHub Profile URL) - Open a pull request to the
developbranch in the original repository.
A big thanks to all contributors who have helped improve this project.
This project is licensed under the MIT License. See LICENSE for details.