This guide explains how to run the Know Your Distro game using Docker.
git clone https://github.com/akashanil-dev/know-your-distro
cd know-your-distro
Download the ZIP directly: https://github.com/akashanil-dev/know-your-distro/archive/refs/heads/master.zip
Extract the ZIP and open the folder.
Open Command Prompt and navigate to the project folder.
Example:
cd C:\Users\YourName\Downloads\know-your-distro
You should see index.html when running:
dir
Create a file named Dockerfile (no extension).
Command Prompt:
type nul > Dockerfile
Open the file in Notepad or VS Code and paste the following:
# Use a lightweight Nginx image as the base
FROM nginx:alpine
# Copy all files from the current Windows directory to the Nginx html directory
COPY . /usr/share/nginx/html
# Expose port 80 (this is the port Nginx listens on inside the container)
EXPOSE 80
Save the file.
Build the Docker image using:
docker build -t linux-runner-game .
Start the container:
docker run -d -p 8080:80 --name my-game linux-runner-game
Open your web browser and visit:
http://localhost:8080
Stop the container:
docker stop my-game
Remove the container:
docker rm my-game
Remove the image:
docker rmi linux-runner-game