ibm-functions / runtime-nodejs

IBM Cloud Functions NodeJS Runtime
Other
15 stars 18 forks source link

Failed to pull container image from private container registry #258

Closed younes-io closed 1 year ago

younes-io commented 1 year ago

I've created a Docker container based on the official base image:

FROM ibmfunctions/action-nodejs-v16:1.0.3
RUN npm install randomNpmPackage

I built it and pushed it to my private container registry; then, I created an action with the command: ibmcloud fn action update kuuid --docker privateCloudRegistry/myProject/myApp:0.0.1 index.js

I got this:

ibmcloud fn action invoke kuuid --result                                              
{
    "error": "Failed to pull container image 'privateCloudRegistry/myProject/myApp:0.0.1'."
}

I realized the --docker option works with Docker Hub registry only ?

--docker string use provided docker image (a path on DockerHub) to run the action

Is there a way to use my customized Docker container hosted in my container registry? (which happens to be the IBM container registry)

younes-io commented 1 year ago

I'm writing in case someone gets the same error in the future. Two takeaways here: 1 - Docker container must be mublic 2 - Container registry must be Docker Hub (as of now, it's the only supported container registry)