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

feat: add docker publish method #63

Closed
wants to merge 0 commits into from
Closed

Conversation

jwillker
Copy link
Contributor

As I mentioned in this issue: #55, the project could have an official docker image.

This implementation will generate a docker image on the Github container registry for amd64 and arm64 architecture for each git tag and the latest version, using Goreleaser. https://goreleaser.com/customization/docker/, https://goreleaser.com/customization/docker_manifest/

The image labels follow the annotation recommendations of https://github.com/opencontainers/image-spec/blob/main/annotations.md.

The action.yaml was changed to work with the image instead of building from Dockerfile.

Some open points:

@another-rex
Copy link
Collaborator

Makes sense to generate an image on DockerHub too? Like: https://hub.docker.com/r/google/osv-scanner

For now I think just having github registry is fine.

The build step was removed from Dockerfile as the Goreleaser recommends: https://goreleaser.com/errors/docker-build/#do, but this will be more difficult for users to build the image from the source. The alternative is to have two Dockerfiles.

Agree with having two Dockerfiles, and would prefer for the goreleaser Dockerfile to be named something different.
I think it's more intuitive for the default Dockerfile to be build-able immediately upon cloning the repository.

For ghcr login we can use the GITHUB_TOKEN, but it can be used with a PAT. (Doc)

Happy to stick with GITHUB_TOKEN.

@another-rex
Copy link
Collaborator

/gcbrun

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