---
title: "Run a container service"
description: "Order a Gyro Containers environment in Istanbul and publish a Docker image with HTTPS."
url: https://www.gyrohosting.com/developers/en/howto/container-service.html
language: en
openapi: https://www.gyrohosting.com/developers/openapi.json
api_version: 2.30.0
---

# Run a container service

Order a Gyro Containers environment in Istanbul and publish a Docker image with HTTPS.


## 1. Order an environment

**curl**

```bash
curl -s -X POST https://www.gyrohosting.com/api/v1/client/cloud/containers \
  -H "Authorization: Bearer $GYRO_TOKEN" -H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \
  -d '{"plan":"mini-1-1","name":"gyro-proje","confirm":true}'
```

**CLI**

```bash
gyro container create --plan mini-1-1 --name gyro-proje --yes
```

Plans: `GET /cloud/containers/plans` (dedicated `mini-1-1` … `pro`, or `serverless`). Usage is charged hourly from the balance.


## 2. Create a public service

**curl**

```bash
curl -s -X POST https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services \
  -H "Authorization: Bearer $GYRO_TOKEN" -H "Content-Type: application/json" \
  -d '{"name":"web","image":"ghcr.io/gyro-ornek/web:1.0","port":8080,"public":true,"health_path":"/healthz"}'
```

**CLI**

```bash
gyro container service create 12345 --name web --image ghcr.io/gyro-ornek/web:1.0 --port 8080 --public --health-path /healthz
```

**Terraform**

```hcl
resource "gyro_container_service" "web" {
  service_id  = 12345   # container environment
  name        = "web"
  image       = "ghcr.io/gyro-ornek/web:1.0"
  port        = 8080
  public      = true
  health_path = "/healthz"
}
output "url" { value = gyro_container_service.web.url }
```

The answer contains the HTTPS address (`<name>-<code>.gyroapp.net`). Containers run as a non-root user: use a port ≥ 1024. Services of one environment reach each other at `<service>:80`.

Next: [deploy on every git push with Gyro Pipeline](https://www.gyrohosting.com/developers/en/howto/container-pipeline.md).
