---
title: "Deploy from an external Docker image"
method: POST
path: "/projects/{project_id}/environments/{environment_id}/deploy/image"
tags: ["Deployments"]
---

# Deploy from an external Docker image

`POST /projects/{project_id}/environments/{environment_id}/deploy/image`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/projects/{project_id}/environments/{environment_id}/deploy/image`
- Auth: HTTP bearer

Triggers a deployment using a pre-built Docker image from an external registry.
The image will be pulled and deployed to the specified environment.

## Path parameters

- `project_id` integer, required
- `environment_id` integer, required

## Request body

- DeployFromImageRequest
  - `claim_local` boolean: Claim an image already present in the platform host's Docker daemon. Temps retags it into a generated project-owned namespace and records its immutable image ID. Never set this for a registry image.
  - `command` string[], nullable: Optional container command override. Each entry is passed directly as one argv element; no shell parsing or interpolation is performed.
  - `external_image_id` integer, nullable: External image ID (if already registered). If provided without image_ref, the image reference will be fetched from the registered external image.
  - `health_check_path` string, nullable: Optional HTTP health-check path override (e.g. "/api/healthz"). Image deploys can't read `.temps.yaml`, so this sets the path the deployer probes after the container starts and the path the environment's uptime monitor checks. Must start with '/'. When omitted, defaults to "/".
  - `image_ref` string, nullable: Docker image reference (e.g., "ghcr.io/org/app:v1.0") Required if external_image_id is not provided
  - `metadata` unknown

## Response `202`

Deployment started

- RemoteDeploymentResponse
  - `created_at` string, date-time, required
  - `environment_id` integer, required
  - `id` integer, required
  - `project_id` integer, required
  - `slug` string, required
  - `source_type` string, required
  - `state` string, required

## Other responses

- `400`: Invalid request
- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Project or environment not found
- `409`: Claiming a local daemon image needs a local Docker daemon, which this process has none of
- `500`: Internal server error

## Changes

- **2026-10-05** `4b228ebed583`: 1 info
  - added the non-success response with the status `409`
- **2026-10-05** `63a80791dc58`: 1 info
  - removed the non-success response with the status `409`
- **2026-09-20** `30549d48a6e6`: 1 info
  - added the non-success response with the status `409`
- **2026-09-07** `c2a1f69745e7`: 1 info
  - added the new optional request property `command`
- **2026-09-07** `7a3103561bd0`: 1 warning
  - removed the request property `command`

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/projects/:project_id/environments/:environment_id/deploy/image/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
