3 KiB
3 KiB
nginx (container image)
Built-from-source container image of the NGINX HTTP server
Tags
Docker Hub
Available on Docker Hub as ricardbejarano/nginx
:
1.19.2-glibc
,1.19.2
,glibc
,master
,latest
(Dockerfile.glibc) (about14MB
)1.19.2-musl
,musl
(Dockerfile.musl) (about12.3MB
)
Quay
Available on Quay as:
quay.io/ricardbejarano/nginx
,quay.io/ricardbejarano/nginx-glibc
, tags:1.19.2
,master
,latest
(Dockerfile.glibc) (about14MB
)quay.io/ricardbejarano/nginx-musl
, tags:1.19.2
,master
,latest
(Dockerfile.musl) (about12.3MB
)
Features
- Super tiny (see Tags)
- 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
Configuration
Volumes
- Mount your configuration at
/etc/nginx/nginx.conf
.
Building
- 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 .
Filesystem
glibc
Based on the glibc implementation of libc
. Dynamically linked.
/
├── etc/
│ ├── group
│ ├── passwd
│ └── ssl/
│ └── certs/
│ └── ca-certificates.crt
├── 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/
musl
Based on the musl implementation of libc
. Statically linked.
/
├── etc/
│ ├── group
│ ├── passwd
│ └── ssl/
│ └── certs/
│ └── ca-certificates.crt
├── nginx
└── tmp/
License
See LICENSE.