|
1 |
| -# Tagging and manifest creation |
| 1 | +# Tags and manifests |
2 | 2 |
|
3 | 3 | The main purpose of the source code in [the `tagging` folder](https://github.com/jupyter/docker-stacks/tree/main/tagging) is to
|
4 | 4 | properly write tags file, build history line and manifest for a single-platform image,
|
@@ -58,33 +58,35 @@ All the taggers follow `TaggerInterface`:
|
58 | 58 |
|
59 | 59 | So, the `tagger(container)` gets a docker container as an input and returns a tag.
|
60 | 60 |
|
61 |
| -`commit_sha_tagger` example: |
| 61 | +For example: |
62 | 62 |
|
63 | 63 | ```{literalinclude} ../../tagging/taggers/sha.py
|
64 | 64 | :language: py
|
65 | 65 | :start-at: def
|
66 | 66 | ```
|
67 | 67 |
|
68 | 68 | - `taggers/` subdirectory contains all taggers.
|
69 |
| -- `apps/write_tags_file.py`, `apps/apply_tags.py`, and `apps/merge_tags.py` are Python executable used to write tags for an image, apply tags from a file, and create multi-arch images. |
| 69 | +- `apps/write_tags_file.py`, `apps/apply_tags.py`, and `apps/merge_tags.py` are Python executables used to write tags for an image, apply tags from a file, and create multi-arch images. |
70 | 70 |
|
71 | 71 | ### Manifest
|
72 | 72 |
|
73 | 73 | All manifest functions except `build_info_manifest` follow `ManifestInterface`
|
74 |
| -and `manifest(container)` method returns a piece of the build manifest. |
| 74 | +and `manifest(container)` method returns a piece of the manifest. |
75 | 75 |
|
76 | 76 | ```{literalinclude} ../../tagging/manifests/manifest_interface.py
|
77 | 77 | :language: py
|
78 | 78 | :start-at: ManifestInterface
|
79 | 79 | ```
|
80 | 80 |
|
81 |
| -`apt_packages_manifest` example: |
| 81 | +For example: |
82 | 82 |
|
83 | 83 | ```{literalinclude} ../../tagging/manifests/apt_packages.py
|
84 | 84 | :language: py
|
85 | 85 | :start-at: def
|
86 | 86 | ```
|
87 | 87 |
|
| 88 | +where: |
| 89 | + |
88 | 90 | - `quoted_output(container, cmd)` simply runs the command inside a container using `DockerRunner.exec_cmd` and wraps it to triple quotes to create a valid markdown piece.
|
89 | 91 | It also adds the command which was run to the markdown piece.
|
90 | 92 | - `manifests/` subdirectory contains all the manifests.
|
|
0 commit comments