IBM QRadar SOAR

IBM QRadar SOAR

Join this online user group to communicate across Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  How to publish app from Docker to Github

    Posted Fri May 31, 2024 01:33 AM

    Hello Team,

    I have delveloped one Application and created package and want to conatinerize and push in repo of github.

    please provide me details to push it to git post conatinerization.

    in docker i can see image is created for application.

    I tried to log in docker login https://ghcr.io -u username  but getting error as Error response from daemon: Get "https://ghcr.io/v2/": denied: denied

    kindly guide me for further steps.



    ------------------------------
    Swapnil

    Software Engineer
    ------------------------------


  • 2.  RE: How to publish app from Docker to Github

    Posted Fri May 31, 2024 06:29 AM

    Hi Swapnil, 

    Reaching out to the development team

    Regards

    John



    ------------------------------
    John Quirke
    ------------------------------



  • 3.  RE: How to publish app from Docker to Github

    Posted Fri May 31, 2024 08:59 AM

    Hi -

    This is not something that we've specifically tried before, pushing to ghcr.io, however, I am certain there will be no problem doing so with an app developed for SOAR.

    As for your specific error, I can't say for sure, this really is not the right forum for this question as it has nothing to do with SOAR. But if I had to guess, simply remove the https:// in your login command. Please make sure you're following a proper guide for logging in such as this one:

    https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry



    ------------------------------
    Bo Bleckel
    ------------------------------



  • 4.  RE: How to publish app from Docker to Github

    Posted Sun June 30, 2024 04:23 AM

    Hi Swapnil.

    Though I'm not sure, the following may be a possible case.

    To upload container image to github, you need to login with your id and "Personal Access Token" for password.  (not login-password)

    Though it's not related to SOAR, "Personal Access Token" can be configured "Settings / Developer Settings / Personal Access tokens / Tokens(classic)" on github.



    ------------------------------
    Yohji Amano
    ------------------------------



  • 5.  RE: How to publish app from Docker to Github

    Posted Mon July 01, 2024 12:45 AM

    Hi Yohji,

    Thanks for the details.

    I have created personal access token on github and able to push docker image to github.

    post that I have set same github container registry path to App host.

    I have installed application and added credentials to test the app.

    But i got Image pulling error.

    Error: code = Unknown desc = failed to pull and unpack image "ghcr.io/ibmresilient/fn_test_new:1.0.0": failed to resolve reference "ghcr.io/ibmresilient/fn_test_new:1.0.0": failed to authorize: failed to fetch oauth token: unexpected status: 403

     Details

    ErrImagePull: rpc error: code = Unknown desc = failed to pull and unpack image "ghcr.io/ibmresilient/fn_test_new:1.0.0": failed to resolve reference "ghcr.io/ibmresilient/fn_test_new:1.0.0": failed to authorize: failed to fetch oauth token: unexpected status: 403 Forbidden..

     



    ------------------------------
    Swapnil Rupnawar
    Senior Security Automation Analyst
    ------------------------------



  • 6.  RE: How to publish app from Docker to Github

    Posted Mon July 01, 2024 02:15 AM

    Hi Swapnil.

    I've got your point.

    I think you suppose the container image path is ghcr.io/<your-git-hub-id>/fn_test_new:1.0.0.

    On the other hand the actual path was ghcr.io/ibmresilient/fn_test_new:1.0.0.

    Given the above, you need to specify "--repository-name" option with your github-id  when you package your application. If you does not specify the respository name, the default is ibmresilient.

    Concretely speaking, you should package with that option.

    resilient-sdk package -p <path-to-directory> --repository-name <your-github-id>

    For references,

    https://community.ibm.com/community/user/security/discussion/resilient-sdk-packaging-custom-application

    https://community.ibm.com/community/user/security/discussion/issue-with-pulling-and-unpacking-docker-image-from-ghcrio#bm7384df23-db35-4ce4-a62d-01904de3f1de



    ------------------------------
    Yohji Amano
    ------------------------------