A simple quote generator built with vanilla HTML, CSS, and JavaScript, containerized with Docker and served via Nginx. Click a button to get a new random quote, or copy it to your clipboard.
- 12 built-in inspirational/motivational quotes
- Random quote on each click, with a smooth fade transition
- Never repeats the same quote twice in a row
- Copy-to-clipboard button with confirmation feedback
- Clean, warm-toned UI
- Frontend: HTML, CSS, JavaScript
- Server: Nginx (Alpine)
- Containerization: Docker
.
├── Dockerfile # Instructions to build the container image
├── index.html # The quote generator app (markup, styling, and logic)
└── README.md
docker pull anasv66/myquotes:v1
docker run -p 8080:80 anasv66/myquotes:v1Then open http://localhost:8080 in your browser.
Clone this repository, then from the project folder:
docker build -t myquotes .
docker run -p 8080:80 myquotesThen open http://localhost:8080 in your browser.
The Dockerfile uses a lightweight nginx:alpine base image to serve the static index.html file. Nginx handles the app on port 80 inside the container, which is mapped to port 8080 on the host machine.
FROM nginx:alpine
COPY index.html /usr/share/nginx/html/index.html
EXPOSE 80Quotes are stored directly in a JavaScript array inside the file — no external API or database is used. Clicking "New Quote" picks a random index from that array and displays it.
- The quote list is fixed at 12 entries and can only be expanded by editing the source code directly.
Public image: anasv66/myquotes
Lawal Anas Ishaq