You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2023/01/02 10:56:53 UTC

[GitHub] [sling-org-apache-sling-starter] tomaszmichalak commented on pull request #80: Multi-arch support for Docker images

tomaszmichalak commented on PR #80:
URL: https://github.com/apache/sling-org-apache-sling-starter/pull/80#issuecomment-1368839088

   > @tomaszmichalak - we now have the required secrets from Infra to enable GitHub actions, can you provide a PR that does that?
   > 
   > I think we should do the following:
   > 
   > * do not try to build multi-arch images locally using Maven
   > * in the GitHub action, build the project using `mvn package`
   > * in the GitHub action, login to Docker Hub ( credentials are DOCKERHUB_USER and DOCKERHOB_TOKEN ), build and push the Docker image
   > 
   > Once we have that, we can disable the DockerHub automated build and drop the code that handles it specifically.
   
   Docker Maven Plugin uses Docker CLI to build and push docker images. We can use maven to build and push Docker images (as we need some artifacts from `target`) but we need to authenticate to DockerHub before running maven. Please check https://github.com/tomaszmichalak/sling-org-apache-sling-starter/blob/feature/docker-multi-arch-support/.github/workflows/docker-push.yml.
   
   Execution: https://github.com/tomaszmichalak/sling-org-apache-sling-starter/actions/runs/3821998937
   Docker images: https://hub.docker.com/layers/tomaszmichalak/sling-starter/13-20230102/images/sha256-f7bd4cc8fee526706191e748bba382b06bb8063915a52b14016353824b05c7f1?context=repo
   
   For the example above, I executed command: `mvn --batch-mode clean install -Dmaven.test.skip=true -Ddocker.image.name=tomaszmichalak/sling-starter -Ddocker.image.tag=${{ github.event.inputs.tag }} -Ddocker.skip=false -Ddocker.skip.push=false` to validate it with my DockerHub account.
   
   After checking that, I removed: `-Ddocker.image.name=tomaszmichalak/sling-starter -Ddocker.image.tag=${{ github.event.inputs.tag }}` so the default image name is used.
   


-- 
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: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org