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

Dockerfile: improve and update to GHCR #245

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

bertsky
Copy link
Collaborator

@bertsky bertsky commented Mar 24, 2023

No description provided.

@bertsky bertsky requested a review from kba March 24, 2023 12:53
Copy link
Member

@kba kba left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!


## Naming images

Image tags MUST be the same as the project name but with underscore (`_`)
Docker image tags MUST be the same as the project name but with underscore (`_`)
replaced with forward slash (`/`).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
replaced with forward slash (`/`).
replaced with forward slash (`/`) and `ocr-d` spelled in lower case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is that the right context to prescribe ocr-d though? IIUC this spec applies to any external module, too. Within github.com/OCR-D we will use that prefix sure, but others should be free to do their thing (including Dockerhub or GHCR or some Gitlab or whatever registry), right?

Copy link
Member

Choose a reason for hiding this comment

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

Sure, I only wanted to prevent people from running into the same problem with ocrd vs OCR-D vs ocr-d. In DockerHub I could add people to the team "ocrd", so they could publish their repos (which did not need to be in the OCR-D organization in GH) to docker.io/ocrd/calamari for example.

Since that does not work with ghcr.io AFAIK, we should maybe not restrict the naming of the image at all?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The paragraph is not about the name of the registry though. It's merely prescribing to not use underscore (because that's forbidden, see docker-image-tag(1)). And since projects are not even required to have ocrd as a name prefix, it could be anything anyway. So for example, once the collegues from Qurator project start providing Docker images, they could place everything under qurator/... (which incidentally they already did btw). And I can use bertsky/... or slub/... etc. With GHCR, it becomes mandatory to use the GH org as prefix, so no need to say anything about that here, either.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

because that's forbidden, see docker-image-tag(1)

Actually, it's not forbidden to use underscores in image tags, only in the host name part of the registry. (I did not catch this when I first read it, because the documentation is a bit cryptic.)

And because for external projects (outside of github.com/OCR-D), their connection to OCR-D is only expressed with the typical ocrd_ prefix, I would even say we should remove this formulation entirely, or at least soften it from a MUST to a SHOULD.

For example, it does not make sense to remove the ocrd_ from bertsky/ocrd_detectron2: bertsky/detectron2 would be confused with a variant of detectron2 proper, and bertsky/ocrd/detectron2 is not allowed.

(I am not saying we should completely reverse course and even use ocrd/ocrd_tesserocr, although I would not object to it. But mandating the removal of ocrd and underscores just does not make sense for external modules.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants