Merge ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:template into ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:master

Proposed by Sergio Durigan Junior
Status: Merged
Merged at revision: bf44fa48d09e02cf5e24295627891151dc022550
Proposed branch: ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:template
Merge into: ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:master
Diff against target: 111 lines (+105/-0)
1 file modified
templates/README_DOCKERHUB.md (+105/-0)
Reviewer Review Type Date Requested Status
Valentin Viennot (community) Approve
Richard Harding (community) Approve
Lucas Kanashiro Pending
Canonical Server Pending
Review via email: mp+394266@code.launchpad.net

Description of the change

Initial version of the template file, made mostly by Valentin.

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

I will post separate MPs for the actual data.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

There is a README file in the repository which explains how to actually the renderdown tool to generate the templates.

Revision history for this message
Richard Harding (rharding) wrote :

ty

review: Approve
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks for the review, Rick. I've just pushed the merge now, but Lucas and Valentin should feel free to review this MP and let me know if they find anything else they'd like to change.

Revision history for this message
Valentin Viennot (valentinviennot) wrote :

Thank you very much Sergio. I reviewed all the requests for yaml data files - few edits needed. The good thing is that I now am able to update all of them at once only by editing this template!

Great job, ty!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/templates/README_DOCKERHUB.md b/templates/README_DOCKERHUB.md
2new file mode 100644
3index 0000000..7e7c7fd
4--- /dev/null
5+++ b/templates/README_DOCKERHUB.md
6@@ -0,0 +1,105 @@
7+# ${application} | Ubuntu
8+<% baserepo='ubuntu' %>
9+
10+## About ${application}
11+
12+${description}
13+
14+## Tags and Architectures
15+<% tag=version.split(".")[0]+'.x' %>
16+
17+| Tag | Currently | Architectures |
18+|---|---|---|
19+| `${tag}` &nbsp;&nbsp; ![BETA](https://assets.ubuntu.com/v1/e8ac33d1-header-beta-flag.svg) | ${application} ${version} on ${base} | ${", ".join(map(lambda x: "`"+x+"`", architectures))} |
20+
21+## Usage
22+
23+Launch this image locally:
24+<% containername=repo+'-container' %>
25+```sh
26+docker run -d --name ${containername} -e TZ=UTC ${" ".join(docker['parameters'])} ${baserepo}/${repo}:${tag}
27+```
28+
29+${docker['access']}
30+
31+#### Parameters
32+
33+| Parameter | Description |
34+|---|---|
35+% for param in parameters:
36+| `${param['type']} ${param['value']}` | ${param['description']} |
37+% endfor
38+
39+% if 'extraparagraph' in debug:
40+${debug['extraparagraph']}
41+% endif
42+
43+#### Testing/Debugging
44+
45+To debug the container:
46+
47+```sh
48+$ docker logs -f ${containername}
49+```
50+
51+To get an interactive shell:
52+
53+```sh
54+$ docker exec -it ${containername} /bin/bash
55+```
56+
57+% if 'network' in debug:
58+This image also includes the `${debug['network']['client']}` client for interactive container use:
59+<% networkname=repo+'-network' %>
60+```sh
61+$ docker network create ${networkname}
62+$ docker network connect ${networkname} ${containername}
63+$ docker run -it --rm --network ${networkname} ${baserepo}/${repo}:${tag} ${debug['network']['client']} ${debug['network']['args']}
64+% if 'followup' in debug['network']:
65+${debug['network']['followup']}
66+% endif
67+```
68+
69+% if 'helper' in debug['network']:
70+${debug['network']['helper']}
71+% endif
72+% endif
73+% if 'text' in debug:
74+${debug['text']}
75+% endif
76+
77+## Deploy with Kubernetes
78+<% configmapname = repo + '-config' %>
79+<% deployfilename = repo + '-deployment.yml' %>
80+
81+Works with any Kubernetes; if you don't have one, we recommend you [install MicroK8s](https://microk8s.io/) and `microk8s enable dns storage` then alias `kubectl` to `microk8s.kubectl`.
82+
83+Download
84+% if 'configmap' in microk8s:
85+${", ".join(map(lambda file: '['+file['name']+']('+file['link']+')', microk8s['configmap']['files']))}, and
86+% endif
87+[${deployfilename}](${microk8s['deploy']['link']}). Then:
88+
89+```sh
90+% if 'configmap' in microk8s:
91+$ kubectl create configmap ${configmapname} ${" ".join(map(lambda file: '--from-file='+file['key']+'='+file['name'], microk8s['configmap']['files']))}
92+% endif
93+$ kubectl apply -f ${deployfilename}
94+```
95+
96+% if 'deploy' in microk8s and 'access' in microk8s['deploy']:
97+${microk8s['deploy']['access']}
98+% endif
99+
100+## Bugs and feature requests
101+
102+If you find a bug in our image or want to request a specific feature, please file a bug here:
103+
104+[https://bugs.launchpad.net/ubuntu-docker-images/+filebug](https://bugs.launchpad.net/ubuntu-docker-images/+filebug)
105+
106+Please title the bug "`${repo}: <reason>`".
107+
108+Make sure to include the digest of the image you are using, from:
109+```sh
110+$ docker images --no-trunc --quiet ${baserepo}/${repo}:<tag>
111+```

Subscribers

People subscribed via source and target branches

to all changes: