chrismahoney / docker-static-website

A very small Docker image (~200KB) to run any static website

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-static-website

A very small Docker image (~200KB) to run any static website, based on the thttpd static file server.

For more details, check out my article.

Usage

The image is hosted on Docker Hub:

FROM lipanski/docker-static-website:latest

# Copy your static files
COPY . .

Build the image:

docker build -t my-static-website .

Run the image:

docker run -it --rm -p 3000:3000 my-static-website

Browse to http://localhost:3000.

If you need to configure the server in a different way, you can override the CMD line:

FROM lipanski/docker-static-website:latest

# Copy your static files
COPY . .

CMD ["/thttpd", "-D", "-h", "0.0.0.0", "-p", "3000", "-d", "/home/static", "-u", "static", "-l", "-", "-M", "60"]

About

A very small Docker image (~200KB) to run any static website

License:MIT License


Languages

Language:Dockerfile 100.0%