adoroszlai opened a new pull request, #30:
URL: https://github.com/apache/ozone-docker-runner/pull/30

   ## What changes were proposed in this pull request?
   
   Currently `ozone-runner` images are built twice:
   
   - by GitHub Actions workflow: used only for testing that the build works, 
discarded after CI run
   - by Docker Hub automated build, when tags are pushed to the git repo
   
   This PR changes the GitHub Actions workflow to publish the image to the 
GitHub Container Registry (but not for pull requests).
   
   Images are versioned by commit SHA.  They are also tagged with git tag, if 
present.
   
   Next steps planned:
   - update `ozone-runner` image reference in Ozone CI
   - replace Docker Hub automated build, pushing the image to Docker Hub from CI
   - tweak build command to create multi-arch image
   
   https://issues.apache.org/jira/browse/HDDS-11632
   
   ## How was this patch tested?
   
   1. pushed commit: image was built ([workflow 
run](https://github.com/adoroszlai/ozone-docker-runner/actions/runs/11619655379),
 
[image](https://github.com/users/adoroszlai/packages/container/ozone-runner/298599602?tag=522396802124849874e2b7b3ef8e02f65183107c))
   2. pushed tag for same commit: build skipped, tag added to existing image 
([workflow 
run](https://github.com/adoroszlai/ozone-docker-runner/actions/runs/11619794316),
 
[image](https://github.com/users/adoroszlai/packages/container/ozone-runner/298599602?tag=tag1-HDDS-11632))
   3. pushed new commit and new tag at once: image was built and tagged 
([workflow 
run](https://github.com/adoroszlai/ozone-docker-runner/actions/runs/11619808734),
 
[image](https://github.com/adoroszlai/ozone-docker-runner/pkgs/container/ozone-runner/298604288?tag=tag2-HDDS-11632))
   
   Verified one the images:
   
   ```
   $ docker pull 
ghcr.io/adoroszlai/ozone-runner:b57ad699321ea3b464e349c8b5cb215cabfdae43
   ...
   Digest: 
sha256:ef2ac1e656f2487479efdf5c0b61e31b2d7f4fc50010e9c43d7441edb4d071e2
   Status: Downloaded newer image for 
ghcr.io/adoroszlai/ozone-runner:b57ad699321ea3b464e349c8b5cb215cabfdae43
   ghcr.io/adoroszlai/ozone-runner:b57ad699321ea3b464e349c8b5cb215cabfdae43
   
   $ docker run -it --rm 
ghcr.io/adoroszlai/ozone-runner:b57ad699321ea3b464e349c8b5cb215cabfdae43 bash
   To use Ozone please mount ozone folder to /opt/hadoop
   [hadoop@24b37b308741 ~]$ 
   
   $ docker pull ghcr.io/adoroszlai/ozone-runner:tag2-HDDS-11632                
                      
   tag2-HDDS-11632: Pulling from adoroszlai/ozone-runner
   Digest: 
sha256:ef2ac1e656f2487479efdf5c0b61e31b2d7f4fc50010e9c43d7441edb4d071e2
   Status: Downloaded newer image for 
ghcr.io/adoroszlai/ozone-runner:tag2-HDDS-11632
   ghcr.io/adoroszlai/ozone-runner:tag2-HDDS-11632
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to