Built-from-source container image of the NGINX HTTP server
Available on Docker Hub as ricardbejarano/nginx
:
Available on Quay as:
quay.io/ricardbejarano/nginx-glibc
, tags:1.17.4
,master
,latest
(Dockerfile.glibc)quay.io/ricardbejarano/nginx-musl
, tags:1.17.4
,master
,latest
(Dockerfile.musl)
- Super tiny (
glibc
-based image is about14.1MB
,musl
-based image is about12.4MB
) - Compiled from source (with binary exploit mitigations) during build time
- Built
FROM scratch
, with zero bloat (see Filesystem) - Reduced attack surface (no shell, no UNIX tools, no package manager...)
- Runs as unprivileged (non-
root
) user
- Mount your configuration at
/etc/nginx/nginx.conf
.
- To build the
glibc
-based image:$ docker build -t nginx:glibc -f Dockerfile.glibc .
- To build the
musl
-based image:$ docker build -t nginx:musl -f Dockerfile.musl .
Based on the glibc implementation of libc
. Dynamically linked.
/
├── etc/
│ ├── group
│ └── passwd
├── lib/
│ └── x86_64-linux-gnu/
│ ├── libc.so.6
│ ├── libcrypt.so.1
│ ├── libdl.so.2
│ ├── libnss_dns.so.2
│ ├── libnss_files.so.2
│ ├── libpthread.so.0
│ └── libresolv.so.2
├── lib64/
│ └── ld-linux-x86-64.so.2
├── nginx
└── tmp/
Based on the musl implementation of libc
. Statically linked.
/
├── etc/
│ ├── group
│ └── passwd
├── nginx
└── tmp/
See LICENSE.