Files
e2b-dev--e2b/.vscode
Mish Ushakov 3d6418184f Add custom registries support for pulling base images (#897)
### Changelog

- added support for pulling base images from AWS, Docker, GCP
registries.
- removed unnecessary conversion in build_api.py.
- synced serialize implementation in TypeScript and Python.
- added Cursor Pylance config (side-effect, can delete if unwanted).

### Examples

**TypeScript**

```ts
import { Template } from 'e2b'

// Generic Docker registry
Template().fromRegistry('ubuntu:22.04', {
  username: 'jirka',
  password: 'password',
})

// AWS ECR registry
Template().fromAWSRegistry('ubuntu:22.04', {
  accessKeyId: '123',
  secretAccessKey: '456',
  region: 'eu-west-1',
})

// GCP GCR registry from file path
Template().fromGCPRegistry('ubuntu:22.04', {
  serviceAccountJSON: './service_account.json',
})

// GCP GCR registry from object
Template().fromGCPRegistry('ubuntu:22.04', {
  serviceAccountJSON: { project_id: '123', private_key_id: '456' },
})
```

**Python**

```py
from e2b import Template

# Generic Docker registry
Template().from_registry(
    image="ubuntu:22.04",
    username="jirka",
    password="password",
)

# AWS ECR registry
Template().from_aws_registry(
    image="ubuntu:22.04",
    access_key_id="123",
    secret_access_key="456",
    region="eu-west-1",
)

# GCP GCR registry from file path
Template().from_gcp_registry(
    image="ubuntu:22.04",
    service_account_json="./service_account.json",
)

# GCP GCR registry from object
Template().from_gcp_registry(
    image="ubuntu:22.04",
    service_account_json={"project_id": "123", "private_key_id": "456"},
)
```
2025-09-09 19:51:40 +00:00
..
2024-10-15 11:52:54 -07:00
2023-08-18 02:22:19 +02:00