Skip to content

Commit 1b1cc1d

Browse files
author
Mike Terhar
authored
Add examples and behaviors to image tag docs
I included examples and things but the "summary" section may be sufficient to get the point across.
1 parent d2bbb22 commit 1b1cc1d

File tree

1 file changed

+56
-2
lines changed

1 file changed

+56
-2
lines changed

images/tags.md

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,60 @@ target="_blank" rel="noreferrer noopener">Image tags</a> are variants of the
88
original (or base) image. Users can publish new image tags containing updated
99
dependencies and tooling useful for work on the project.
1010

11+
## Image tag lifecycle
12+
13+
Coder uses tags for images to determine which image a user intends create a
14+
workspace from. Examples of tags:
15+
16+
ubuntu:rolling
17+
ubuntu:20.04
18+
codercom/enterprise-node:ubuntu
19+
mycorp/myproject:v1
20+
21+
For the first pair, they both refer to Ubuntu base images however the way each
22+
tag is used is quite different. The `:20.04` tag stays with that release and is
23+
updated with patches and fixes but not typically new functionality. For new
24+
functionality, the `:rolling` tag will move up to `:20.10` and eventually `:21.04`
25+
as the new versions are released.
26+
27+
In Coder, if a workspace is created using a `:20.04` style tag and the supported
28+
software moves on to require `:20.10`, the user will not be alerted. Coder will
29+
inform the developer when patches and updates are available so they can rebuild
30+
the workspace to get rid of the outdated versions. This is good for long-term
31+
support of software that has lengthy version cycles or multiple supported
32+
versions where jumping back to "last year's release" to investigate or hotfix
33+
can be expected.
34+
35+
If the workspace is created from a `:rolling` or `:latest` sort of tag, the
36+
workspace will prompt to be rebuilt for the same patching and security updates
37+
but will also prompt for a rebuild when a major version increase happens. This
38+
may be preferred for support SaaS or mobile apps that update frequently and need
39+
to stay current for everyone.
40+
41+
For the `codercom/enterprise-node:ubuntu` image, the name denotes the company
42+
and software architecture ("node") while the tag specifies the base image.
43+
Without a version, it can be assumed that it will operate like a rolling
44+
tag. It also implies that other flavors such as `:centos` or `:arch` may be
45+
available if users prefer those.
46+
47+
Finally, the `mycorp/myproj:v1` image can help make it clear that the image is
48+
tightly associated with a specific project's major version. The `:v1` tag can
49+
be applied to the most recent build for that image while more specific `:v1.3`
50+
or even `:v1.3.1` tags allow users to summon a very specific tag.
51+
52+
#### Summary
53+
54+
* `latest` will always prompt the user to rebuild whenever the tag is placed
55+
on a new image
56+
* `v1` will prompt the user to rebuild whenever the tag is placed on a new
57+
image but shouldn't move to `v2`
58+
* `ubuntu` or another sort of tag will behave as `latest` but implies the
59+
existence of alternatives
60+
* `v1.3.1` would typically not be added to Coder unless a user needs to go
61+
back to a very specific image from
62+
63+
## Add a tag
64+
1165
To add a tag to Coder:
1266

1367
1. Go to **Images** and find the original image.
@@ -17,13 +71,13 @@ To add a tag to Coder:
1771
When someone publishes a new version of a tag, Coder notifies users of that tag
1872
with active environments.
1973

20-
## Default Tag
74+
## Default tag
2175

2276
Each image has a default tag. The default tag appears at the top of the list and
2377
is indicated by an asterisk. Coder automatically selects the default tag when
2478
you create an environment.
2579

26-
### Changing the Default Tag
80+
### Changing the default tag
2781

2882
> We encourage you to update an image's default tag whenever you publish new
2983
> tags since Coder suggests the default tag whenever someone creates a new

0 commit comments

Comments
 (0)