Search code examples
restdockerdocker-api

Docker REST API : Create Image issue : Need help for parameter fromSrc:


Hi Guys need your help.

I am creating an Image via docker REST API.

The link mentioned for parameter fromSrc following is the description :

fromSrc: Source to import. The value may be a URL from which the image can be retrieved or - to read the image from the request body. This parameter may only be used when importing an image.

if anyone can suggest the meaning of to read the image from the request body part and how we can test this


Solution

  • to read the image from the request body

    means that you have to put your image as Json into the body of your request.

    The URL, in this case, will look like this '.../images/create?fromSrc=-'

    To test this, you can use Restlet client or Postman, which are chrome extensions that let you build a request with a body.