https://github.com/jawg/docker-nginx-spa
nginx Single Page Application configuration with Docker
https://github.com/jawg/docker-nginx-spa
docker docker-image dockerfile nginx spa
Last synced: 2 months ago
JSON representation
nginx Single Page Application configuration with Docker
- Host: GitHub
- URL: https://github.com/jawg/docker-nginx-spa
- Owner: jawg
- Created: 2019-08-29T15:15:46.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2026-02-24T08:47:47.000Z (4 months ago)
- Last Synced: 2026-02-24T14:45:15.845Z (4 months ago)
- Topics: docker, docker-image, dockerfile, nginx, spa
- Language: Shell
- Homepage: https://hub.docker.com/r/jawg/nginx-spa
- Size: 13.7 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker nginx SPA
## Supported tags and respective `Dockerfile` links
- [`mainline`, `1`, `latest`](https://github.com/jawg/docker-nginx-spa/blob/master/mainline/debian/Dockerfile)
- [`mainline-alpine`, `1-alpine`, `alpine`](https://github.com/jawg/docker-nginx-spa/blob/master/mainline/alpine/Dockerfile)
- [`stable`](https://github.com/jawg/docker-nginx-spa/blob/master/stable/debian/Dockerfile)
- [`stable-alpine`](https://github.com/jawg/docker-nginx-spa/blob/master/stable/alpine/Dockerfile)
## What is nginx?
Nginx (pronounced "engine-x") is an open source reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer, HTTP cache, and a web server (origin server). The nginx project started with a strong focus on high concurrency, high performance and low memory usage. It is licensed under the 2-clause BSD-like license and it runs on Linux, BSD variants, Mac OS X, Solaris, AIX, HP-UX, as well as on other *nix flavors. It also has a proof of concept port for Microsoft Windows.
> [wikipedia.org/wiki/Nginx](https://en.wikipedia.org/wiki/Nginx)

## What is a Single Page Application?
A single-page application (SPA) is a web application or web site that interacts with the user by dynamically rewriting the current page rather than loading entire new pages from a server. This approach avoids interruption of the user experience between successive pages, making the application behave more like a desktop application. In a SPA, either all necessary code – HTML, JavaScript, and CSS – is retrieved with a single page load, or the appropriate resources are dynamically loaded and added to the page as necessary, usually in response to user actions.
> [wikipedia.org/wiki/Single-page_application](https://en.wikipedia.org/wiki/Single-page_application)
## How to use this image
This image is based on the official [nginx](https://hub.docker.com/_/nginx) image, you can use it in the same way.
```console
$ docker run --name some-nginx -p 8080:80 -v /some/content:/usr/share/nginx/html:ro -d jawg/nginx-spa
```
## Additional features
- Run your server on a different port with the environment `NGINX_LISTEN_ADDRESS`. Default value is `80`.
- Chose your mode between `spa` and `default` with `NGINX_SERVER_MODE`. Default value is `spa`.
- gzip on selected mime types
- no-cache on html files
- 24h of expiry for images
- avoid large body in requests (POST/PUT...)