1 min to read
Serve static files in no time with NGINX and Docker
What is NGINX?
Initially it was just a webserver. Nowadays, it is often used as a reverse proxy, load balancer, and HTTP cache, static files server and more.
Serving static files
with docker, it is super simple. Just run:
docker run -it --rm -d -p 8080:80 nginx:1.23.3
index.html is served on
Let’s look into it
docker exec -it CONTAINER_ID bash
example file is served in
find . | grep index.html
and nginx config is in
find . | grep nginx.conf