Add Dockerfile and update README for Docker deployment

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
Sami 2025-08-31 04:09:45 -04:00
parent 680779c03d
commit 75119916e8
2 changed files with 28 additions and 1 deletions

11
Dockerfile Normal file
View File

@ -0,0 +1,11 @@
# Use the official Nginx image as the base image
FROM nginx:alpine
# Copy the local files to the Nginx default directory
COPY . /usr/share/nginx/html
# Expose port 80
EXPOSE 80
# Start Nginx when the container launches
CMD ["nginx", "-g", "daemon off;"]

View File

@ -1 +1,17 @@
just a fun project for my kid, he loves the Conways game of life. # The Game of Life
This project is a web-based implementation of Conway's Game of Life.
## How to Run with Docker
1. Build the Docker image:
```bash
docker build -t game-of-life .
```
2. Run the container:
```bash
docker run -d -p 8080:80 game-of-life
```
3. Open your browser and go to `http://localhost:8080` to see the Game of Life in action.