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

Update Docker Hub README and keep it in sync with this repository. #4087

Merged
merged 1 commit into from Oct 2, 2023

Conversation

milosgajdos
Copy link
Member

This PR

  • adds a new docs page (docs/dockerhub.md) that contains the new contents of the README for distribution/distribution Docker Hub repository
  • updates the default configuration file that gets baked into the docker image which is published to Docker Hub -- there are a ton of options that produce a lot of logs that confuse the users who are just getting started with the image we distribute via the Docker Hub
  • updates the CI with a new workflow job that keeps Docker Hub README in sync with the contents of the docs/dockerhub.md file

Closes #4014

@milosgajdos
Copy link
Member Author

CC: @crazy-max for the CI / GHA review 😄

Copy link
Contributor

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

Copy link
Contributor

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh actually I think you just want to update the README on release or on every push on main?

@milosgajdos
Copy link
Member Author

Ideally everytime we modify the dockerhub readme, so on every merge to main seems like the best thing to do - IF we could do that conditionally thatd be the biggest win

@crazy-max
Copy link
Contributor

crazy-max commented Oct 1, 2023

Ok then I would suggest a dedicated workflow named dockerhub-readme.yml to update dockerhub readme only when there are changes in the README. Smth like that:

name: dockerhub-readme

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

on:
  push:
    branches:
      - 'main'
    paths:
      - '.github/dockerhub-readme.yml'
      - 'docs/dockerhub.md'

env:
  DOCKERHUB_SLUG: distribution/distribution

jobs:
  update:
    runs-on: ubuntu-latest
    steps:
      -
        name: Update Docker Hub Description
        uses: peter-evans/dockerhub-description@v3
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_PASSWORD }}
          repository: ${{ env.DOCKERHUB_SLUG }}
          readme-filepath: ./docs/dockerhub.md

@milosgajdos
Copy link
Member Author

Ah, yeah, that's much better than my cruft 😅 Let me update

Copy link
Contributor

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@thaJeztah
Copy link
Member

Would it make sense to have this page live in either https://github.com/docker/distribution-library-image

or https://github.com/docker-library/docs ?

@milosgajdos
Copy link
Member Author

Would it make sense to have this page live in either https://github.com/docker/distribution-library-image
or https://github.com/docker-library/docs ?

I have thought about it of course but

Keeping those in sync with Hub from this repo is a fool's errand IMHO, hence this approach

@thaJeztah
Copy link
Member

Right, but both those repositories are the ones that are used to publish the image to docker hub, so thought it would probably be the most appropriate location (as this repository itself doesn't publish an image)

@milosgajdos
Copy link
Member Author

this repository itself doesn't publish an image

Wrong. It does, but not an Official image. See the PR. We maintain https://hub.docker.com/r/distribution/distribution and actively push to it.

@thaJeztah
Copy link
Member

Wrong. It does, but not an Official image. See the PR.

DOH! My bad I thought this was about the official image 🙈

@milosgajdos
Copy link
Member Author

DOH! My bad I thought this was about the official image 🙈

Can you LGTM this then @thaJeztah 🙃

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes LGTM; can you squash the touch-up commits where needed?

This commit
* adds a new docs page (`dockerhub.md`) that contains Docker Hub README
* updates the default config that gets backed into the docker image
* updates CI with a new workflow job that keeps Docker Hub README in
  sync with the contents of the `docs/dockerhub.md` file

Co-authored-by: CrazyMax <github@crazymax.dev>
Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
@milosgajdos
Copy link
Member Author

Squashed. Should be goo to go @thaJeztah

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@milosgajdos milosgajdos merged commit a210144 into distribution:main Oct 2, 2023
12 checks passed
@milosgajdos milosgajdos deleted the update-dockerhub-docs branch October 2, 2023 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update README in Docker Hub
4 participants