0

I am trying to create docker image for my java spring application in my local machine and try to push that into docker hub/some on permisys docker registry repo.

I am using maven and sportify plugin is it possible to build and push the image without docker being installed in my local machine to docker hub or any other private repo?

I am using windows machine.

springbootlearner
  • 1,220
  • 4
  • 26
  • 48

3 Answers3

1

Technically no, but you do need a Docker daemon running somewhere.

The setup instructions only mention that by default, it assumes Docker is running locally.

By default the plugin will try to connect to docker on localhost:2375. Set the DOCKER_HOST environment variable to connect elsewhere.

If you dive a little deeper and look at how buildImage is implemented, you see it uses the Spotify DockerClient. Conveniently, that project is also available on GitHub. Looking at how the build method is implemented, you see that it zips up a specified directory and does an HTTP POST to the build endpont.

Roman
  • 19,581
  • 6
  • 68
  • 84
0

docker is like any other software which is required to be installed and in working condition on the machine where you may wanted to build.

If you wanted to build an image on your machine, it is required to be installed on your machine.

If you wanted to build an image on your build machine which is in your lab, then you may not needed to have docker on your machine.

Hope this helpful to understand better.

Rao
  • 20,781
  • 11
  • 57
  • 77
  • @springbootlearner, if the is useful, consider up vote/accepting answer if you want to appreciate. Happy to know that this answer is useful. – Rao Nov 14 '16 at 02:07
0

As said here, you can simply use Jib for that.

Read Google's blog post about this.

Anthony O.
  • 22,041
  • 18
  • 107
  • 163