Nginx, a high-performance reverse proxy & web server. Long-term tracks maintained by Canonical.
10M+
Current Nginx Docker Imagefrom Canonical, based on Ubuntu. Receives security updates and rolls to newer Nginx or Ubuntu release.This repository is free to use and exempted from per-user rate limits.
Nginx ("engine X") is a high-performance web and reverse proxy server created by Igor Sysoev. It can be used both as a standalone web server and as a proxy to reduce the load on back-end HTTP or mail servers. Read more on thenginx website.
Up to 5 years of free security maintenance on LTS channels.
Up to 10 years of customer security maintenancefrom Canonical's restricted repositories.
| Channel Tags | Supported until | Currently | Architectures | |
|---|---|---|---|---|
1.27-24.04_stable | 1-24.04,1-24.04_beta,1-24.04_candidate,1-24.04_edge,1-24.04_stable,1.27-24.04,1.27-24.04_beta,1.27-24.04_candidate,1.27-24.04_edge | - | Nginx 1.27 on Ubuntu 24.04 LTS | amd64 |
1.26-24.10_beta | 1.26-24.10_edge,edge,latest | - | Nginx 1.26 on Ubuntu 24.10 | amd64,arm64,ppc64le,s390x |
1.24-24.04_beta | 1.24-24.04_edge | - | Nginx 1.24 on Ubuntu 24.04 LTS | amd64,s390x,ppc64le,arm64 |
1.24-23.10_beta | 1.24-23.10_edge | - | Nginx 1.24 on Ubuntu 23.10 | ppc64le,s390x,arm64,amd64 |
1.22-23.04_beta | 1.22-23.04_edge | - | Nginx 1.22 on Ubuntu 23.04 | s390x,arm64,amd64,ppc64le |
1.22-22.10_beta | 1.22-22.10_edge | - | Nginx 1.22 on Ubuntu 22.10 | amd64,s390x,ppc64le,arm64 |
1.18-22.04_beta | 1.18-22.04_edge | - | Nginx 1.18 on Ubuntu 22.04 LTS | amd64,s390x,ppc64le,arm64 |
1.18-21.10_beta | 1.18-21.10_edge | - | Nginx 1.18 on Ubuntu 21.10 | amd64,s390x,arm64,ppc64le |
1.18-21.04_beta | 1.18-21.04_edge | - | Nginx 1.18 on Ubuntu 21.04 | s390x,arm64,amd64,ppc64le |
1.18-20.04_beta | 1.18-20.04_edge | - | Nginx 1.18 on Ubuntu 20.04 LTS | arm64,amd64,ppc64le,s390x |
track_risk |
Channel Tags shows the most stable channel for that track orderedstable,candidate,beta,edge. More risky channels are always implicitly available. So ifbeta is listed, you can also pulledge. Ifcandidate is listed, you can pullbeta andedge. Whenstable is listed, all four are available. Images are guaranteed to progress through the sequenceedge,beta,candidate beforestable.
If your usage includes commercial redistribution, or requires ESM or unavailable channels/versions, pleaseget in touch with the Canonical team (or using[email protected]).
Launch this image locally:
docker run -d --name nginx-container -e TZ=UTC -p 8080:80 ubuntu/nginx:1.27-24.04_stableAccess your Nginx server athttp://localhost:8080.
| Parameter | Description |
|---|---|
-e TZ=UTC | Timezone. |
-p 8080:80 | Expose Nginx onlocalhost:8080. |
-v /local/path/to/website:/var/www/html | Mount and serve a local website. |
-v /path/to/conf.template:/etc/nginx/templates/conf.template | Mount template files inside/etc/nginx/templates. They will be processed and the results will be placed at/etc/nginx/conf.d. (e.g.listen ${NGINX_PORT}; will generatelisten 80;). |
-v /path/to/nginx.conf:/etc/nginx/nginx.conf | Localconfiguration filenginx.conf (trythis example). |
To debug the container:
docker logs -f nginx-containerWorks with any Kubernetes; if you don't have one, we recommend youinstall MicroK8s andmicrok8s.enable dns storage thensnap alias microk8s.kubectl kubectl.
Downloadnginx.conf,index.html andnginx-deployment.yml and setcontainers.nginx.image innginx-deployment.yml to your chosen channel tag (e.g.ubuntu/nginx:1.27-24.04_stable), then:
kubectl create configmap nginx-config --from-file=nginx=nginx.conf --from-file=nginx-site=index.htmlkubectl apply -f nginx-deployment.ymlYou will now be able to connect to the nginx server onhttp://localhost:31080.
If you find a bug in our image or want to request a specific feature, please file a bug here:
https://bugs.launchpad.net/ubuntu-docker-images/+filebug
Please title the bug "nginx: <issue summary>". Make sure to include the digest of the image you are using, from:
docker images --no-trunc --quiet ubuntu/nginx:<tag>These channels (tags) are not updated anymore. Please upgrade to newer channels, orreach out if you can't upgrade.
| Track | Version | EOL | Upgrade Path |
|---|---|---|---|
track |
Content type
Image
Digest
sha256:3acad1ceb…
Size
46.9 MB
Last updated
3 months ago
docker pull ubuntu/nginx:1.18-20.04_betaPulls:
13,520
Last week