Pulling a docker image during a gradle task


I am currently engaged in a project to integrate a data warehouse application with Apache Solr to improve the search facilities. I want to pull a Apache Solr docker image during a build task and run indexing procedure. Is there any way in gradle to pull a docker image from docker hub? My plan was to run a shell script through gradle. But I am wondering whether there might be any better way to do this.

That is a reasonable first approach.

1 Like

There are Gradle Docker plugins out there for implementing the use case you describe. For example this one provides a task type for pulling Docker images.

1 Like