10000 Non-existent tag in image name · Issue #5554 · squidfunk/mkdocs-material · GitHub
[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-existent tag in image name #5554

Closed
2 tasks done
vladislav-sharapov opened this issue May 23, 2023 · 7 comments
Closed
2 tasks done

8000 Non-existent tag in image name #5554

vladislav-sharapov opened this issue May 23, 2023 · 7 comments
Labels
documentation Issue concerns the documentation resolved Issue is resolved, yet unreleased if open

Comments

@vladislav-sharapov
Copy link
vladislav-sharapov commented May 23, 2023

Description

Shell command docker pull squidfunk/mkdocs-material:9 from Installation with docker section doesn't work, because tag 9 doesn't exist:

$ docker pull squidfunk/mkdocs-material:9
Error response from daemon: manifest for squidfunk/mkdocs-material:9 not found: manifest unknown: manifest unknown

Related links

Proposed change

I don't really see difference between tags 9 and latest even if tag 9 existed. For example, Installation with pip section provides 2 ways to install latest version. From my point of view, it will be more helpful if documentation will describe how to install latest version and some pinned version like in Ansible documentation. Same we can apply to Installation with docker section.

Before submitting

@vladislav-sharapov vladislav-sharapov added the documentation Issue concerns the documentation label May 23, 2023
@squidfunk
Copy link
Owner
squidfunk commented May 27, 2023

@crazy-max sorry to bother you again. I think it would be great to tag the images with minor and major versions, so users can pin the Docker image to a major version using semantic versioning. Studying the documentation of docker/metadata-action, I believe we need to change the following:

tags: |
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr

We're following semantic versioning as much as possible, so I believe we should use that, correct? If so, would this configuration work? What are branch and pr needed for?

tags: |
  type=semver,pattern={{version}}
  type=semver,pattern={{major}}.{{minor}}
  type=semver,pattern={{major}}

This should tag the image with 9.1.14, 9.1 and 9.

@squidfunk squidfunk added the needs help Issue needs help by other contributors label May 27, 2023
@crazy-max
Copy link
Contributor
crazy-max commented May 27, 2023

What are branch and pr needed for?

branch will create a tag matching the branch name, in your case squidfunk/mkdocs-material:master. On pr event it will create a tag that looks like pr-${number}.

This should tag the image with 9.1.14, 9.1 and 9.

Yes that sounds good:

      - name: Generate Docker tags and labels
        id: meta
        uses: docker/metadata-action@v4
        with:
          images: |
            ${{ github.event.repository.full_name }}
            ghcr.io/${{ github.event.repository.full_name }}
          tags: |
            type=semver,pattern={{version}}
            type=semver,pattern={{major}}.{{minor}}
            type=semver,pattern={{major}}
            type=ref,event=branch
            type=ref,event=pr
          flavor: |
            latest=${{ github.event.release.prerelease == false }}

You could keep branch and enable push to hub repo for every push on master branch. This way users could test unreleased image and try out edge changes. Keeping pr would be good when pushing to ghcr.io so you can test PRs using ghcr.io/squidfunk/mkdocs-material:pr-123456.

@crazy-max
Copy link
Contributor
crazy-max commented May 27, 2023

As you are just enabling push on release:

push: ${{ github.event_name == 'release' }}

Then branch and pr tags will never be pushed anyway.

@squidfunk
Copy link
Owner

Thanks for checking back so quickly! We'll keep pr and branch then, if somebody wants to enable it in a fork ☺️

@squidfunk
Copy link
Owner

Fixed in f37702a. On the next release, this issue will be resolved.

@squidfunk squidfunk added resolved Issue is resolved, yet unreleased if open and removed needs help Issue needs help by other contributors labels May 27, 2023
@squidfunk
Copy link
Owner

And done! Big thanks again to @crazy-max for the quick and awesome support 🤘

https://hub.docker.com/layers/squidfunk/mkdocs-material/9/images/sha256-404c4e499ab8f3d7c8e0ee21e1365ed0f85d088d171e1ea9da67dbe6cbdc6ae6

@crazy-max
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issue concerns the documentation resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

3 participants
0