Docker · Arazzo Workflow

Docker Pull an Image and Run a Container

Version 1.0.0

Pull an image from a registry, create a container from it, start it, and read back its running state.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub CloudContainersDevOpsInfrastructureMicroservicesArazzoWorkflows

Provider

docker

Workflows

run-container
Pull an image, create and start a container from it, and confirm it is running.
Pulls the image tag, creates a named container with the supplied command and environment, starts it, and inspects the result so the caller ends up with a container id and a confirmed running state.
5 steps inputs: cmd, containerName, env, image, registryAuth, tag outputs: containerId, imageId, state
1
pullImage
Pull the requested image and tag from the registry into the daemon's local image store so the container can be created from it.
2
inspectImage
Confirm the pulled image is present in the local store and capture its id before creating a container from it.
3
createContainer
Create a container from the pulled image with the supplied name, command and environment. The container is created but not yet started.
4
startContainer
Start the newly created container. The daemon returns 204 on success and 304 if the container was already started.
5
confirmRunning
Read back the container's low-level state to confirm the daemon reports it running, and capture the state and network settings for the caller.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Docker Pull an Image and Run a Container
  summary: Pull an image from a registry, create a container from it, start it, and read back its running state.
  description: >-
    The canonical Docker Engine API flow, and the API equivalent of
    `docker run`. The workflow pulls the requested image tag from the registry,
    creates a container from that image with an inline configuration, starts the
    container, and then inspects it to confirm the daemon reports it running.
    Every step spells out its request inline so the flow can be read and executed
    without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: containerApi
  url: ../openapi/docker-container-api-openapi.yml
  type: openapi
- name: imageApi
  url: ../openapi/docker-image-api-openapi.yml
  type: openapi
workflows:
- workflowId: run-container
  summary: Pull an image, create and start a container from it, and confirm it is running.
  description: >-
    Pulls the image tag, creates a named container with the supplied command and
    environment, starts it, and inspects the result so the caller ends up with a
    container id and a confirmed running state.
  inputs:
    type: object
    required:
    - image
    - tag
    - containerName
    properties:
      image:
        type: string
        description: Name of the image to pull (e.g. "nginx" or "registry.example.com/myimage").
      tag:
        type: string
        description: Tag of the image to pull and run (e.g. "alpine" or "latest").
      containerName:
        type: string
        description: Name to assign to the created container.
      cmd:
        type: array
        description: Command to run in the container, as an argv array.
        items:
          type: string
      env:
        type: array
        description: Environment variables in "KEY=value" form.
        items:
          type: string
      registryAuth:
        type: string
        description: Base64url-encoded registry auth configuration, required only for private images.
  steps:
  - stepId: pullImage
    description: >-
      Pull the requested image and tag from the registry into the daemon's local
      image store so the container can be created from it.
    operationId: ImageCreate
    parameters:
    - name: fromImage
      in: query
      value: $inputs.image
    - name: tag
      in: query
      value: $inputs.tag
    - name: X-Registry-Auth
      in: header
      value: $inputs.registryAuth
    successCriteria:
    - condition: $statusCode == 200
  - stepId: inspectImage
    description: >-
      Confirm the pulled image is present in the local store and capture its id
      before creating a container from it.
    operationId: ImageInspect
    parameters:
    - name: name
      in: path
      value: $inputs.image
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      imageId: $response.body#/Id
  - stepId: createContainer
    description: >-
      Create a container from the pulled image with the supplied name, command
      and environment. The container is created but not yet started.
    operationId: ContainerCreate
    parameters:
    - name: name
      in: query
      value: $inputs.containerName
    requestBody:
      contentType: application/json
      payload:
        Image: $inputs.image
        Cmd: $inputs.cmd
        Env: $inputs.env
        AttachStdout: true
        AttachStderr: true
        Tty: false
        HostConfig:
          RestartPolicy:
            Name: unless-stopped
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      containerId: $response.body#/Id
      warnings: $response.body#/Warnings
  - stepId: startContainer
    description: >-
      Start the newly created container. The daemon returns 204 on success and
      304 if the container was already started.
    operationId: ContainerStart
    parameters:
    - name: id
      in: path
      value: $steps.createContainer.outputs.containerId
    successCriteria:
    - condition: $statusCode == 204
  - stepId: confirmRunning
    description: >-
      Read back the container's low-level state to confirm the daemon reports it
      running, and capture the state and network settings for the caller.
    operationId: ContainerInspect
    parameters:
    - name: id
      in: path
      value: $steps.createContainer.outputs.containerId
    - name: size
      in: query
      value: false
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.State.Running == true
      type: jsonpath
    outputs:
      state: $response.body#/State
      name: $response.body#/Name
      networkSettings: $response.body#/NetworkSettings
  outputs:
    containerId: $steps.createContainer.outputs.containerId
    imageId: $steps.inspectImage.outputs.imageId
    state: $steps.confirmRunning.outputs.state

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/docker-run-container-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.