I am just exploring the implementation of CI/CD pipeline using Kubernetes, Jenkins, Docker Hub and with my private SVN repository. I am exploring the Docker image creating and pushing into Docker Hub automatically when a commit or any SVN operation is done in repository.
Here in examples, I am seeing the creating one pipeline job with adding GitHub repository code repo link and docker hub credentials. And adding one Jenkinsfile in the project root folder as the same position as Dockerfile. Here I had felt one doubt of this image creation method.
Instead of creating Jenkinsfile and Jenkins configuration, can I create the Docker image automatically only by adding shell script in Jenkins?
I am a beginner in build automation. How can I clear my confusion?