diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2b714d1 --- /dev/null +++ b/Dockerfile @@ -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;"] \ No newline at end of file diff --git a/README.md b/README.md index bb1ebf3..478befe 100644 --- a/README.md +++ b/README.md @@ -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. \ No newline at end of file