Sign inSign up

alen77777/fire_snake_web

By alen77777

•Updated 8 months ago

localhost:5050, java, javascript, for QA or SDET engineers

Image
Integration & delivery
API management
Web servers
0

1.2K

alen77777/fire_snake_web repository overview

⁠Fire Snake Game — Web Version

A browser-based Snake game with shooting mechanics in a single Docker image. Play locally in seconds, use it for demos, or as a test app for QA engineers and SDETs. One image, no install: just run and open your browser.


⁠Why use this image?
  • Instant run — One docker run and the game is available at http://localhost:5050. No Java or Maven on your machine.
  • Same everywhere — Same Java 21, same app, on any OS. Ideal for teams, classrooms, or CI.
  • Lightweight — JRE-only final image; built with a multi-stage Dockerfile.
  • Ideal test target — Clear rules, visible state, REST API, and session logs. Great for manual testing, automation (Selenium/Playwright), API tests, and CI/CD practice.

⁠Quick start
docker run -p 5050:5050 alen77777/fire_snake_web:latest

Then open http://localhost:5050⁠ in your browser.
Use Space or arrow keys to start; Space to shoot, R to restart after game over.


⁠What’s inside?
  • Backend: Spring Boot 3.2, serves the game UI and static assets.
  • Frontend: HTML5 Canvas + vanilla JavaScript (Snake, shooting, targets, enemy AI).
  • API: POST /api/log for session logging (game events, keys, score). Logs are written under /app/logs in the container.

The app creates a logs/ directory at startup and writes one log file per browser session, so you can test APIs, inspect behavior, or use it for QA evidence.


⁠Persist logs (optional)

To keep session logs on your host:

docker run -p 5050:5050 -v /path/on/host/logs:/app/logs alen77777/fire_snake_web:latest

Replace /path/on/host/logs with your desired folder. On Windows (PowerShell): -v ${PWD}/logs:/app/logs.


⁠Why it’s great for QA and SDET
  • Deterministic behavior — Movement, scoring, lives, and collisions follow clear rules you can assert on.
  • Observable state — Score, length, lives, and high score are visible in the UI and can be correlated with session logs.
  • REST endpoint — /api/log is ready for API testing (payloads, status codes, file creation).
  • Reproducible — Same image everywhere: local, Jenkins, or cloud. Good for E2E and environment parity.

Use it for test automation practice, training, or as a standard “test app” in pipelines.


⁠Technical details
ItemValue
BaseEclipse Temurin 21 JRE
Port5050 (HTTP)
UserNon-root firesnake
SourceGitHub: Fire_Snake_Web⁠

⁠Game features (short)
  • Classic Snake movement (grid-based), grow by eating food.
  • Food as Tetris-style shapes — only the circle you touch is eaten; the rest stays.
  • Shoot targets (multiple types and sizes) for score and length; some targets change speed or shrink the snake.
  • Enemy snake AI that moves and shoots; avoid or destroy it.
  • Extra-life pickups (hearts), multiple lives, game over and restart.
  • High score stored in the browser (localStorage).

Pull the image and play or test in under a minute. If you use it for teaching, automation, or CI, consider starring the repo or sharing your use case.


Tag summary

Content type

Image

Digest

sha256:e91c1f62c…

Size

140.6 MB

Last updated

8 months ago

docker pull alen77777/fire_snake_web