项目作者: cupcakearmy

项目描述 :
Static Server
高级语言: Dockerfile
项目地址: git://github.com/cupcakearmy/docker-static.git
创建时间: 2019-08-10T19:46:49Z
项目社区:https://github.com/cupcakearmy/docker-static

开源协议:

下载


NGINX Static Server

Docker Pulls
Docker Image Size (tag)
Docker Image Version (tag latest semver)

This is a little docker image for hosting static content efficiently.
Supports ETags & Brotli/GZip compression out of the box.

Automatically builds the latest mainline and stable releases weekly.

Features

  • Brotli & GZip
  • ETag
  • No server tokens

Tags

Tags follow the official nginx naming convention.

  • mainline, same as latest
  • stable
  • Specific version

Quickstart 🚀

  1. # docker-compose.yml
  2. version: '3.7'
  3. services:
  4. server:
  5. image: cupcakearmy/static
  6. restart: unless-stopped
  7. ports:
  8. - 80:80
  9. volumes:
  10. - ./public:/srv:ro
  1. docker-compose up -d

Custom Configuration

  1. # my.conf
  2. server {
  3. listen 80;
  4. server_name _;
  5. location / {
  6. root /srv;
  7. try_files $uri /index.html =404;
  8. }
  9. }
  1. version: '3.7'
  2. services:
  3. server:
  4. # ...
  5. volumes:
  6. - ./my.conf:/usr/local/nginx/conf/sites/default.conf
  7. # ...