From 6624f257d35f806a7ba7f4903555a5147538b3cf Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 24 Feb 2024 18:41:10 +0800 Subject: [PATCH] Docker Tag Information in Docs (#29047) (#29362) Backport #29047 Add more details for the docker tag when using container registry. Co-authored-by: wienans <40465543+wienans@users.noreply.github.com> Co-authored-by: wxiaoguang Co-authored-by: KN4CK3R --- docs/content/usage/packages/container.en-us.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/content/usage/packages/container.en-us.md b/docs/content/usage/packages/container.en-us.md index 6be21c2b27..5676aa36fb 100644 --- a/docs/content/usage/packages/container.en-us.md +++ b/docs/content/usage/packages/container.en-us.md @@ -39,6 +39,16 @@ Images must follow this naming convention: `{registry}/{owner}/{image}` +When building your docker image, using the naming convention above, this looks like: + +```shell +# build an image with tag +docker build -t {registry}/{owner}/{image}:{tag} . +# name an existing image with tag +docker tag {some-existing-image}:{tag} {registry}/{owner}/{image}:{tag} +``` + +where your registry is the domain of your gitea instance (e.g. gitea.example.com). For example, these are all valid image names for the owner `testuser`: `gitea.example.com/testuser/myimage`