---
title: "Create a container"
method: POST
path: "/containers/create"
---

# Create a container

`POST /containers/create`

## Request body

- CreateContainerRequest
  - `image` string, required
  - `name` string, nullable
  - `cpus` integer, nullable
  - `memoryBytes` integer, nullable
  - `hostname` string, nullable
  - `env` string[]
  - `cmd` string[]
  - `workingDir` string, nullable
  - `publishedPorts` CreatePortMapping[]
    - `hostPort` integer, required
    - `containerPort` integer, required
    - `proto` string, nullable
    - `hostAddress` string, nullable

## Response `201`

Container created

- CreateContainerResponse
  - `id` string, required
  - `warnings` string[], required

## Other responses

- `400` — Resource not found
- `409` — Resource conflict
- `501` — Operation not supported by the active backend

---

[API](https://skmtc.net/full-chaos/apis/container-compose-api.md) · [All operations](https://skmtc.net/full-chaos/apis/container-compose-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/full-chaos/container-compose-api/versions/7bf76e7a9941/schema)
