0
votes

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?

1

1 Answers

1
votes

If you are working on maven projects, then you can easily create Docker images using Docker maven plugin(https://github.com/fabric8io/docker-maven-plugin).

Through Jenkins, you can easily integrate a maven project and execute maven commands which will create the Docker image.