How to NOT automatically push docker image using prugins/docker?

Is it possible to use plugins/docker to build an image and use it in next step without pushing it to my private repository? I’d like to push it only if test succeeds after the build stage.

  1. build image
  2. test it
  3. push image to private repo if test succeeds

How can this be accomplished?

the docker image is designed to build and push images (see this thread for more context). If this particular image does not meet your needs you have other options, including working directly with docker [1][2], or you could find or create an alternate plugin.