Pull and convert an OCI image
POST/images
Experimental. Pulls a registry image and converts it to a bootable rootfs. Returns 501 when image support is not enabled (set --image-dir).
Request bodyapplication/json
PullImageRequest
refstringResponses
201 CreatedCreated
ImageResponse
cmdarray
items
string
content_bytesintegerint64convert_modestringconverted_at_unix_msintegerint64digeststringentriesintegerentrypointarray
items
string
exposed_portsarray
items
string
size_bytesintegerint64source_refstring400 Bad requestBad Request
ErrorResponse
errorstring501 Not Implemented
ErrorResponse
errorstring502 Bad gatewayBad Gateway
ErrorResponse
errorstringAuthentication
bearerAuthHTTP bearer. Daemon API key. Omit on a keyless loopback daemon.Request
▍POST/images
curl '/images' \
-X POST \
-H 'Content-Type: application/json' \
-d '{}'const response = await fetch("/images", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: "{}",
});
const data = await response.json();import requests
response = requests.post(
"/images",
headers={
"Content-Type": "application/json",
},
data="{}",
)
data = response.json()Response
201 Created
{
"cmd": [
"string"
],
"content_bytes": 0,
"convert_mode": "string",
"converted_at_unix_ms": 0,
"digest": "string",
"entries": 0,
"entrypoint": [
"string"
],
"exposed_ports": [
"string"
],
"size_bytes": 0,
"source_ref": "string"
}