Using Docker API to pull from a private registry

What is the syntax to pull an image from a private registry?

I am trying to reproduce the below command with the API:

  • PhpStorm error with docker volumes: “VirtualBox shared folders should be configured in the Docker cloud settings”
  • chef-server stuck ruby_block[supervise_rabbitmq_sleep] action run on Docker container
  • How do I give an own ip address to docker for Windows container?
  • Linux Container vs JVM
  • Hitting resources in a private network from within a Docker container using VPN
  • How to rename exported environment variable in docker
  • docker pull localhost:5000/oillio/my_app:1.0-SNAPSHOT
    

    It looks like I am supposted to use the images/create call. There are 4 parameters, fromImage, fromSrc, repo, tag, and registry. I can’t for the life of me figure out how to set those parameters to reproduce the above command.

  • how to ignore logs with docker commit
  • creating a docker container from a rootfs
  • what does the -i flag do in docker?
  • php-fpm child process exited on signal 11
  • Service ports not visible in overlay network across hosts using docker swarm mode
  • How can I make JHipster applications REST services run on different docker containers?
  • One Solution collect form web for “Using Docker API to pull from a private registry”

    Something similar to this has worked for me:

    curl -X POST localhost:2375/images/create?fromImage=localhost:5000/oillio/my_app&tag=1.0-SNAPSHOT
    

    Where localhost:2375 is my private server

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.