Change docker tag logic #16421

Merged
lunny merged 5 commits from docker-changes into main 2021-07-14 17:08:43 +00:00
Contributor

This PR changes the image tagged as :latest on docker hub to represent the :latest released version of Gitea.

  • :latest will now be mapped to latest tag on the 1.15 branch.
  • :dev will represent the latest build from the main branch.

Replace: #15889
Fixes #15622

thanks to @pat-s for the initial work on this PR :)

⚠️ BREAKING ⚠️

Previously the :latest docker tag would map to the latest build from main. Users who wish to use the absolute latest version of Gitea should migrate to use :dev and we would ask that at least some users do consider using the :dev tag if possible.

This PR changes the image tagged as `:latest` on docker hub to represent the `:latest` released version of Gitea. * `:latest` will now be mapped to latest tag on the 1.15 branch. * `:dev` will represent the latest build from the `main` branch. Replace: #15889 Fixes #15622 thanks to @pat-s for the initial work on this PR :) ## :warning: BREAKING :warning: Previously the `:latest` docker tag would map to the latest build from `main`. Users who wish to use the absolute latest version of Gitea should migrate to use `:dev` and we would ask that at least some users do consider using the `:dev` tag if possible.
lafriks (Migrated from github.com) approved these changes 2021-07-14 15:22:38 +00:00
kdumontnu requested changes 2021-07-14 15:31:49 +00:00
kdumontnu left a comment
Contributor

This requires an update in gitea/docs/content/doc/installation/with-docker* docs, right?

This requires an update in `gitea/docs/content/doc/installation/with-docker*` docs, right?
.drone.yml Outdated
@ -897,0 +1042,4 @@
ignore_missing: true
spec: docker/manifest.rootless.tmpl
password:
from_secret: docker_password
Contributor

Does this need the fetch-tags step since we are not using version tags in the docker build step?

Not sure if the dockerfiles need tags for RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}";, but if I understand the logic, if [ -n "${GITEA_VERSION}" ] should always resolve false here for dev build.

Does this need the `fetch-tags` step since we are not using version tags in the docker build step? Not sure if the dockerfiles need tags for `RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}";`, but if I understand the logic, `if [ -n "${GITEA_VERSION}" ]` should always resolve false here for dev build.
Contributor
    image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}dev{{/if}}-linux-amd64-rootless

For consistency with the image logic above

```suggestion image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}dev{{/if}}-linux-amd64-rootless ``` For consistency with the image logic above
Contributor
    image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}dev{{/if}}-linux-arm64-rootless
```suggestion image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}dev{{/if}}-linux-arm64-rootless ```
techknowlogick reviewed 2021-07-14 15:48:23 +00:00
.drone.yml Outdated
@ -897,0 +1042,4 @@
ignore_missing: true
spec: docker/manifest.rootless.tmpl
password:
from_secret: docker_password
Author
Contributor

It does need the fetch-tags logic, as otherwise we can't generate a version based on git information (eg. 1.15.0+dev-582-g3dcb3e907).

It does need the fetch-tags logic, as otherwise we can't generate a version based on git information (eg. `1.15.0+dev-582-g3dcb3e907`).
kdumontnu reviewed 2021-07-14 16:03:21 +00:00
@ -44,3 +42,4 @@
image: gitea/gitea:{{< version >}}-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
Contributor

latest-rootless should still work, right? Or are you just suggesting people version-lock their docker-compose files?

`latest-rootless` should still work, right? Or are you just suggesting people version-lock their docker-compose files?
techknowlogick reviewed 2021-07-14 16:12:52 +00:00
@ -44,3 +42,4 @@
image: gitea/gitea:{{< version >}}-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
Author
Contributor

Yup, it still works, but your assumption of what I was doing was correct. This also aligns with what the other page has.

Yup, it still works, but your assumption of what I was doing was correct. This also aligns with what the other page has.
kdumontnu approved these changes 2021-07-14 16:31:57 +00:00
kdumontnu left a comment
Contributor

? (fair warning: I'm not a docker expert, but it resolves the initial issues I saw)

? (fair warning: I'm not a docker expert, but it resolves the initial issues I saw)
sapk (Migrated from github.com) approved these changes 2021-07-14 16:42:04 +00:00
This repo is archived. You cannot comment on pull requests.
No Milestone
No project
No Assignees
3 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lunny/gitea#16421
No description provided.