From 2891a2008aaa004bfae358aff0d4630b5724adb8 Mon Sep 17 00:00:00 2001 From: wienans <40465543+wienans@users.noreply.github.com> Date: Sun, 4 Feb 2024 11:18:27 +0100 Subject: [PATCH 1/6] Docker Tag Information in Docs --- docs/content/usage/packages/container.en-us.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/content/usage/packages/container.en-us.md b/docs/content/usage/packages/container.en-us.md index 6be21c2b276f4..d73fe476833b5 100644 --- a/docs/content/usage/packages/container.en-us.md +++ b/docs/content/usage/packages/container.en-us.md @@ -51,6 +51,12 @@ For example, these are all valid image names for the owner `testuser`: ## Push an image +Before pushing an image it needs to be taged with the following command: + +```shell +docker tag {image}:{tag} gitea.example.com/{owner}/{image}:{tag} +``` + Push an image by executing the following command: ```shell From 7da5eef7e4d7d9f7181193947be584bc2c141dc9 Mon Sep 17 00:00:00 2001 From: wienans <40465543+wienans@users.noreply.github.com> Date: Sun, 4 Feb 2024 19:04:53 +0100 Subject: [PATCH 2/6] Move the comment down and make it only in case of error --- docs/content/usage/packages/container.en-us.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/content/usage/packages/container.en-us.md b/docs/content/usage/packages/container.en-us.md index d73fe476833b5..59f3b1855eb70 100644 --- a/docs/content/usage/packages/container.en-us.md +++ b/docs/content/usage/packages/container.en-us.md @@ -51,12 +51,6 @@ For example, these are all valid image names for the owner `testuser`: ## Push an image -Before pushing an image it needs to be taged with the following command: - -```shell -docker tag {image}:{tag} gitea.example.com/{owner}/{image}:{tag} -``` - Push an image by executing the following command: ```shell @@ -75,6 +69,12 @@ For example: docker push gitea.example.com/testuser/myimage:latest ``` +If you run into the error "An image does not exist locally with the tag" simply run the following command: + +```shell +docker tag {image}:{tag} gitea.example.com/{owner}/{image}:{tag} +``` + ## Pull an image Pull an image by executing the following command: From 52e5aab3085d08cc63473f33228bdc5dd6c4e48a Mon Sep 17 00:00:00 2001 From: wienans <40465543+wienans@users.noreply.github.com> Date: Sun, 4 Feb 2024 22:07:47 +0100 Subject: [PATCH 3/6] Retry the push afterwards --- docs/content/usage/packages/container.en-us.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/usage/packages/container.en-us.md b/docs/content/usage/packages/container.en-us.md index 59f3b1855eb70..20791d425277e 100644 --- a/docs/content/usage/packages/container.en-us.md +++ b/docs/content/usage/packages/container.en-us.md @@ -69,7 +69,7 @@ For example: docker push gitea.example.com/testuser/myimage:latest ``` -If you run into the error "An image does not exist locally with the tag" simply run the following command: +If you run into the error "An image does not exist locally with the tag" simply run the following command and retry the push afterwards: ```shell docker tag {image}:{tag} gitea.example.com/{owner}/{image}:{tag} From f247fe0bc5c4cb82c40350fd2385af67a51a66e7 Mon Sep 17 00:00:00 2001 From: wienans <40465543+wienans@users.noreply.github.com> Date: Tue, 6 Feb 2024 16:50:57 +0100 Subject: [PATCH 4/6] Move the command to Naming convetion --- docs/content/usage/packages/container.en-us.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/content/usage/packages/container.en-us.md b/docs/content/usage/packages/container.en-us.md index 20791d425277e..9e479d9e5312d 100644 --- a/docs/content/usage/packages/container.en-us.md +++ b/docs/content/usage/packages/container.en-us.md @@ -39,6 +39,12 @@ Images must follow this naming convention: `{registry}/{owner}/{image}` +Name your image according to the convetion with the following command: + +```shell +docker tag {image}:{tag} gitea.example.com/{owner}/{image}:{tag} +``` + For example, these are all valid image names for the owner `testuser`: `gitea.example.com/testuser/myimage` @@ -69,12 +75,6 @@ For example: docker push gitea.example.com/testuser/myimage:latest ``` -If you run into the error "An image does not exist locally with the tag" simply run the following command and retry the push afterwards: - -```shell -docker tag {image}:{tag} gitea.example.com/{owner}/{image}:{tag} -``` - ## Pull an image Pull an image by executing the following command: From d7097615a516d9cfff412ce89b5ed27b2bd45281 Mon Sep 17 00:00:00 2001 From: wienans <40465543+wienans@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:13:48 +0100 Subject: [PATCH 5/6] Update docs/content/usage/packages/container.en-us.md Co-authored-by: wxiaoguang --- docs/content/usage/packages/container.en-us.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/content/usage/packages/container.en-us.md b/docs/content/usage/packages/container.en-us.md index 9e479d9e5312d..1d642eab2caa9 100644 --- a/docs/content/usage/packages/container.en-us.md +++ b/docs/content/usage/packages/container.en-us.md @@ -39,12 +39,16 @@ Images must follow this naming convention: `{registry}/{owner}/{image}` -Name your image according to the convetion with the following command: +When building your docker image, using the naming convention above, this looks like: ```shell -docker tag {image}:{tag} gitea.example.com/{owner}/{image}:{tag} +# 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` From ec7cc430675abfeb1be0c201881aedb94a01bbb4 Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Fri, 16 Feb 2024 14:16:05 +0100 Subject: [PATCH 6/6] Update docs/content/usage/packages/container.en-us.md --- docs/content/usage/packages/container.en-us.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/usage/packages/container.en-us.md b/docs/content/usage/packages/container.en-us.md index 1d642eab2caa9..5676aa36fba0f 100644 --- a/docs/content/usage/packages/container.en-us.md +++ b/docs/content/usage/packages/container.en-us.md @@ -48,7 +48,7 @@ docker build -t {registry}/{owner}/{image}:{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) +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`