I am trying to build an image using s2i local source code repository following this documentation https://github.com/openshift/source-to-image/blob/master/docs/cli.md . So far I managed to create the image and to generate the s2i scripts using -
s2i create test-image s2i_scripts
. After that I tried to build the image locally using - s2i build . test-image test-image-app
I am running this command while I am in the repository directory.
The result I get after trying to build:
pulling image error : Error response from daemon: pull access denied for test-image, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
pulling image error : Error response from daemon: pull access denied for test-image, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
ERROR: An error occurred: unable to get test-image:latest
ERROR: Suggested solution: check image name, or if using a local image set the builder image pull policy to "never"
ERROR: If the problem persists consult the docs at https://github.com/openshift/source-to-image/tree/master/docs. Eventually reach us on freenode #openshift or file an issue at https://github.com/openshift/source-to-image/issues providing us with a log from your build using log output level 3.
Did a docker login
as well, it was successful...but when I tried to build again the error was the same. What am I missing or not doing right?
The reason why it was failing was that I didn't pull a base image to use it for my source code. So I pulled centos7 base image - podman pull centos/python-36-centos7
and then I tried to build again and it worked - s2i build . centos/python-36-centos7 test-image-app