Merge ~ubuntu-docker-images/ubuntu-docker-images/+git/nginx:1.18-21.04 into ~ubuntu-docker-images/ubuntu-docker-images/+git/nginx:edge

Proposed by Bryce Harrington
Status: Merged
Merge reported by: Bryce Harrington
Merged at revision: 1f5c8351eed02d608c1154474e7e3c28ce66a4d8
Proposed branch: ~ubuntu-docker-images/ubuntu-docker-images/+git/nginx:1.18-21.04
Merge into: ~ubuntu-docker-images/ubuntu-docker-images/+git/nginx:edge
Diff against target: 99 lines (+23/-15)
4 files modified
Dockerfile (+18/-10)
HACKING.md (+1/-1)
README.md (+3/-3)
data/nginx.yaml (+1/-1)
Reviewer Review Type Date Requested Status
Sergio Durigan Junior Approve
Review via email: mp+398851@code.launchpad.net

Description of the change

Enforce consistency across Dockerfile's

Please review with an eye towards cross-package standardization of packaging.
Particular strategic questions that this MP poses includes:

  * Should images adhere to base dist images, or fully update to current?
  * Perform smoke checks, consistently
  * Perform a full-upgrade on container before installing on it
  * Use --no-install-recommends
  * Use set -eux consistently

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

LGTM, +1.

review: Approve
1f5c835... by Sergio Durigan Junior

Update README.md, HACKING.md and data/nginx.yaml

Signed-off-by: Sergio Durigan Junior <email address hidden>

Revision history for this message
Bryce Harrington (bryce) wrote :

This is merged and complete

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Dockerfile b/Dockerfile
2index 8808835..ab31a36 100644
3--- a/Dockerfile
4+++ b/Dockerfile
5@@ -1,19 +1,27 @@
6-FROM ubuntu:focal
7+FROM ubuntu:hirsute
8
9 ENV TZ UTC
10
11-RUN set -x \
12+RUN set -eux; \
13 # create nginx user/group first, to be consistent throughout docker variants
14- && addgroup --system --gid 101 nginx \
15- && adduser --system --disabled-login --ingroup nginx --no-create-home --home /nonexistent --gecos "nginx user" --shell /bin/false --uid 101 nginx \
16- && apt-get update \
17- && apt-get install -y nginx-full gettext-base tzdata \
18- && apt-get remove --purge --auto-remove -y && rm -rf /var/lib/apt/lists/* \
19+ addgroup --system --gid 101 nginx; \
20+ adduser --system --disabled-login --ingroup nginx --no-create-home --home /nonexistent --gecos "nginx user" --shell /bin/false --uid 101 nginx; \
21+# installation
22+ apt-get update; \
23+ DEBIAN_FRONTEND=noninteractive apt-get full-upgrade -y; \
24+ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
25+ nginx-full \
26+ gettext-base \
27+ tzdata; \
28+ DEBIAN_FRONTEND=noninteractive apt-get remove --purge --auto-remove -y;
29+ rm -rf /var/lib/apt/lists/*; \
30 # create a docker-entrypoint.d directory
31- && mkdir /docker-entrypoint.d \
32+ mkdir /docker-entrypoint.d; \
33+# smoke test
34+ nginx -V; \
35 # create manifest
36- && mkdir -p /usr/share/rocks/ \
37- && (echo "# os-release" && cat /etc/os-release && echo "# dpkg-query" && dpkg-query -f '${db:Status-Abbrev},${binary:Package},${Version},${source:Package},${Source:Version}\n' -W) > /usr/share/rocks/dpkg.query
38+ mkdir -p /usr/share/rocks/; \
39+ (echo "# os-release" && cat /etc/os-release && echo "# dpkg-query" && dpkg-query -f '${db:Status-Abbrev},${binary:Package},${Version},${source:Package},${Source:Version}\n' -W) > /usr/share/rocks/dpkg.query;
40
41 COPY docker-entrypoint.sh /
42 COPY 20-envsubst-on-templates.sh /docker-entrypoint.d
43diff --git a/HACKING.md b/HACKING.md
44index 5d1fba4..73cbe1a 100644
45--- a/HACKING.md
46+++ b/HACKING.md
47@@ -1,7 +1,7 @@
48 # Contributing
49
50 In Ubuntu, Nginx is available as a `.deb` package. For this reason,
51-this image was built by installing the Nginx Ubuntu Focal package
52+this image was built by installing the Nginx Ubuntu 21.04 package
53 inside a docker container.
54
55 In order to contribute to the Nginx OCI image, do the following:
56diff --git a/README.md b/README.md
57index f48b59c..2947d6f 100644
58--- a/README.md
59+++ b/README.md
60@@ -19,7 +19,7 @@ _Tags in italics are not available in ubuntu/nginx but are shown here for comple
61
62 | Channel Tag | | | Currently | Architectures |
63 |---|---|---|---|---|
64-| **`1.18-20.04_beta`** &nbsp;&nbsp; | | | Nginx 1.18.0 on Ubuntu 20.04 LTS | `amd64`, `arm64`, `ppc64el`, `s390x` |
65+| **`1.18-21.04_beta`** &nbsp;&nbsp; | | | Nginx 1.18.0 on Ubuntu 21.04 | `amd64`, `arm64`, `ppc64el`, `s390x` |
66 | _`track_risk`_ |
67
68 Channel tag shows the most stable channel for that track ordered `stable`, `candidate`, `beta`, `edge`. More risky channels are always implicitly available. So if `beta` is listed, you can also pull `edge`. If `candidate` is listed, you can pull `beta` and `edge`. When `stable` is listed, all four are available. Images are guaranteed to progress through the sequence `edge`, `beta`, `candidate` before `stable`.
69@@ -30,7 +30,7 @@ Channel tag shows the most stable channel for that track ordered `stable`, `cand
70 Launch this image locally:
71
72 ```sh
73-docker run -d --name nginx-container -e TZ=UTC -p 8080:80 ubuntu/nginx:1.18-20.04_beta
74+docker run -d --name nginx-container -e TZ=UTC -p 8080:80 ubuntu/nginx:1.18-21.04_beta
75 ```
76 Access your Nginx server at `http://localhost:8080`.
77
78@@ -66,7 +66,7 @@ Works with any Kubernetes; if you don't have one, we recommend you [install Micr
79
80 Download
81 [nginx.conf](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/nginx/plain/examples/config/nginx.conf), [index.html](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/nginx/plain/examples/config/html/index.html) and
82-[nginx-deployment.yml](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/nginx/plain/examples/nginx-deployment.yml) and set `containers.nginx.image` in `nginx-deployment.yml` to your chosen channel tag (e.g. `ubuntu/nginx:1.18-20.04_beta`), then:
83+[nginx-deployment.yml](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/nginx/plain/examples/nginx-deployment.yml) and set `containers.nginx.image` in `nginx-deployment.yml` to your chosen channel tag (e.g. `ubuntu/nginx:1.18-21.04_beta`), then:
84
85 ```sh
86 kubectl create configmap nginx-config --from-file=nginx=nginx.conf --from-file=nginx-site=index.html
87diff --git a/data/nginx.yaml b/data/nginx.yaml
88index 63f8c21..711923e 100644
89--- a/data/nginx.yaml
90+++ b/data/nginx.yaml
91@@ -4,7 +4,7 @@ repo: nginx
92 description: >
93 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/).
94 version: 1.18.0
95-base: Ubuntu 20.04 LTS
96+base: Ubuntu 21.04
97 architectures:
98 - amd64
99 - arm64

Subscribers

People subscribed via source and target branches

to all changes: