Sign inSign up

dgadams/nginx

By dgadams

•Updated 2 months ago

nginx - a small variation of nginx build on debian and shrunk down to 10.7MB

Image
Networking
0

527

dgadams/nginx repository overview

⁠nginx small build

This is a small image of nginx web server. It is useful for static web pages. Both http and https.

Check out: https://hub.docker.com/r/tigersmile/nginx-micro⁠ for an even smaller statically built image.

⁠Notes:

  • Built on debian trixie-slim linux.

    • Many unneeded libraries and commands are removed to shrink the footprint.
    • The bookworm images is about 11 MB.
    • The alpine image is about 8.5 MB.
  • Build this with "docker buildx build -t nginx ."

  • Pulls the nginx runtime from debian apt sources.

  • See the source on github https://github.com/dgadams/nginx⁠

⁠Usage:

I generally run this with a docker compose file:

name: nginx
services:
  nginx:
    container_name: web-server
    image: dgadams/nginx:trixie
#   image: nginx:alpine-slim
    restart: unless-stopped
    ports:
      - 80:80
      - 443:443
    volumes:
      - /home/doug/www/nginx.conf:/etc/nginx/nginx.conf
      - /home/doug/www/html:/var/www/html
      - /home/doug/.certs:/etc/nginx/certs
#    networks:
#      - cf-tunnel

#networks:
#  cf-tunnel:
#    external: true

Tag summary

Content type

Image

Digest

sha256:09ec11e0c…

Size

4.2 MB

Last updated

2 months ago

docker pull dgadams/nginx:alpine