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

Best practices for pushing images to the DockerHub organization #147

Open
annaritz opened this issue Feb 20, 2024 · 1 comment
Open

Best practices for pushing images to the DockerHub organization #147

annaritz opened this issue Feb 20, 2024 · 1 comment

Comments

@annaritz
Copy link
Contributor

I just pushed a new image of random walk with restart to DockerHub under the reedcompbio organization. This image came from a branch in @Lyce24's forked SPRAS repo: https://github.com/Lyce24/spras/tree/RWR, and he is currently testing it before doing a pull request to merge RWR.

This is prone to some inconsistency - the current docker image in the reedcompbio organization is from a Dockerfile that is not in the SPRAS repo yet. On the other hand, we want the image to be associated with the reedcompbio organization so the code in the PR can be merged into SPRAS.

One option is to keep the docker image in the developer's Dockerhub account, and once the branch is merged then push the image to reedcompbio. However, then there are two images floating around of the same method -one in the developer's account and one on reedcompbio.

@agitter
Copy link
Collaborator

agitter commented Feb 21, 2024

The workflow I have used is roughly the following. See what you think of this and make any suggestions. We can make this more prominent in the contributing guide if we like it.

  1. Contributor creates the Dockerfile in their SPRAS branch, builds the Docker image locally, and pushes it to their DockerHub account for development
  2. The new SPRAS wrapper function uses the Docker image from the contributor's DockerHub account for the initial implementation and pull request review
  3. One of the members of the DockerHub reedcompbio organization (me or @annaritz) builds the Docker image locally from the Dockerfile to test it and pushes it to the DockerHub reedcompbio organization with tags v1 and latest. They also populate minimal metadata on DockerHub.
  4. Before merging the pull request, the contributor switches the wrapper functions and GitHub Actions workflows to use the reedcompbio DockerHub image instead of the contributor's image and makes sure it is tagged v1

I'm not positive step 2 will still work after the registry configuration changes in #132. The Docker username or organization used to be hard coded.

I don't see a problem with having two copies of the image on DockerHub.

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

No branches or pull requests

2 participants