Merge ~valentinviennot/ubuntu-docker-images:update-nginx-readme into ~ubuntu-docker-images/ubuntu-docker-images/+git/nginx:edge

Proposed by Valentin Viennot
Status: Merged
Merged at revision: 618524d3dae23738d07a81ff90134c12f71f10a9
Proposed branch: ~valentinviennot/ubuntu-docker-images:update-nginx-readme
Merge into: ~ubuntu-docker-images/ubuntu-docker-images/+git/nginx:edge
Diff against target: 83 lines (+8/-41)
1 file modified
README.md (+8/-41)
Reviewer Review Type Date Requested Status
Sergio Durigan Junior Approve
Richard Harding Pending
Review via email: mp+393904@code.launchpad.net

Description of the change

Consistency and cleaning.

To post a comment you must log in.
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

LGTM. I will address my comment in a subsequent commit.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/README.md b/README.md
2index 7e80594..e13e504 100644
3--- a/README.md
4+++ b/README.md
5@@ -2,16 +2,12 @@
6
7 ## About Nginx
8
9-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.
10-
11-Read more on the [nginx website](https://www.nginx.com/).
12+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 the [nginx website](https://www.nginx.com/).
13
14 ## Tags
15
16 * `1.18.0-focal`, `1.18.0`, `1.18-focal`, `1.18`, `1-focal`, `1`, `focal`, `beta` - **/!\ this is a beta release**
17
18-* `edge` = `1.18.0-0ubuntu1`
19-
20 ## Architectures supported
21
22 * `amd64`, `arm64`, `ppc64el`, `s390x`
23@@ -21,8 +17,7 @@ Read more on the [nginx website](https://www.nginx.com/).
24 ### Docker CLI
25
26 ```
27-$ docker network create nginx-net --driver bridge
28-$ docker run -d --name nginx --network nginx-net -p 8080:80 -d squeakywheel/nginx:edge
29+$ docker run -d --name nginx -p 8080:80 -e TZ=Europe/London squeakywheel/nginx:edge
30 ```
31
32 You can now point your browser to http://localhost:8080/ and verify
33@@ -32,44 +27,16 @@ that it works.
34
35 | Parameter | Description |
36 |---|---|
37-| `-e TZ=UTC` | Timezone, e.g. `Europe/London` |
38-| `-v /local/path/to/website:/var/www/html` | Mount and serve a local website |
39-| `-v /my/config/nginx.conf:/etc/nginx/nginx.conf` | Mount a local configuration `nginx.conf` |
40-
41-#### Environment variables inside nginx configuration
42-
43-Nginx doesn't support environment variables inside most configuration blocks out-of-the-box, but this image is created in a way that makes this possible.
44-
45-You have to mount template files inside `/etc/nginx/templates`. They will be processed and the results will be placed at `/etc/nginx/conf.d`.
46+| `-e TZ=UTC` | Timezone. |
47+| `-p 8080:80` | Expose Nginx on `localhost:8080`. |
48+| `-v /path/to/website:/var/www/html` | Mount and serve a local website. |
49+| `-v /path/to/.template:/etc/nginx/templates/.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 generate `listen 80;`). |
50+| `-v /my/config/nginx.conf:/etc/nginx/nginx.conf` | Mount a local configuration `nginx.conf` (download this [example file](https://git.launchpad.net/~canonical-server/ubuntu-server-oci/+git/nginx/plain/examples/config/nginx.conf)). |
51
52-Consider this `docker-compose.yml`:
53-
54-```
55-web:
56- image: squeakywheel/nginx:edge
57- volumes:
58- - ./templates:/etc/nginx/templates
59- ports:
60- - 8080:80
61- environment:
62- - NGINX_PORT=80
63-```
64-
65-And this `templates/default.conf.template`:
66-
67-```
68-listen ${NGINX_PORT};
69-```
70-
71-If you mount `templates/default.conf.template` inside `/etc/nginx/templates`, it will generate a `/etc/nginx/conf.d/default.conf` like:
72-
73-```
74-listen 80;
75-```
76
77 #### Testing/Debugging
78
79-In case you need to debug what it is happening with the container you can run `docker logs <name_of_the_container>`. But if you want to get access to an interactive shell run:
80+In case you need to debug what it is happening with the container you can run `docker logs <name_of_the_container>`. To get access to an interactive shell run:
81
82 ```
83 $ docker exec -it <name_of_the_container> /bin/bash

Subscribers

People subscribed via source and target branches