v1

latestOpenAPI 3.1.02026-07-2675394318.9 KB
images

Import a container image from a registry

Imports the OCI image filesystem content of from a specified registry.

Important limitations and behavior:

  • Only the image root filesystem (files and directories) is imported. This is like to the output of docker export and does not preserve layers metadata.
  • Most image configuration and manifest data are ignored. Metadata such as LABEL, ENTRYPOINT, CMD, WORKDIR, EXPOSE and other image configuration directives will NOT be imported or applied.
  • ENV variables defined in the image are imported and automatically applied to the instance environment when shell is set to true. When shell is false, image environment variables are not inherited and must be passed explicitly via the env field.
  • The result is a flat rootfs snapshot with preserved environment variables.
  • If the specified tag already exists in the public images, the imported image will replace it. To avoid this, you can tag the existing image with a different tag for use it later. You also can use image UUIDs it is not changing for imported and existend image.
  • In case the remote image is unchanged and already imported, the operation will complete and the same UUID will be returned without re-importing the image.

The request creates an import operation which runs asynchronously.

post/images/import

Request body

tagstring nullable

Tag to identify the image when listing publicly available images. If omitted, the image will be private and only accessible by ID.

timeoutinteger

Maximum time in seconds to wait for the import operation to complete

Example request

{
  "registry": {
    "url": "docker://docker.io/busybox:latest",
    "credentials": {
      "username": "myuser",
      "password": "secret"
    }
  },
  "tag": "busybox:latest",
  "timeout": 300
}

Response

Created - The request has been accepted for processing

uuidstring uuid required

A UUID string

Example response

{
  "uuid": "12345678-9abc-baba-deda-0123456789ab"
}