> ## Documentation Index
> Fetch the complete documentation index at: https://e2b.manicule.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://e2b.manicule.dev/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://e2b.manicule.dev/api/mcp.
> Every agent surface: https://e2b.manicule.dev/.well-known/llms-manifest.json

# Private registries (/docs/template/private-registries)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 384 · updated: 2026-07-30 -->
Related: [Quickstart](/docs/template/quickstart.md), [How it works](/docs/template/how-it-works.md), [User and workdir](/docs/template/user-and-workdir.md), [Caching](/docs/template/caching.md), [Base image](/docs/template/base-image.md), [Defining template](/docs/template/defining-template.md)

> Access private registries as the base image

If your base image is hosted in a private registry, you can provide credentials using the following helpers:

* General registry
* GCP Artifact Registry
* AWS ECR

## General registry

<CodeGroup>
```typescript title="JavaScript & TypeScript"
Template().fromImage('ubuntu:22.04', {
  username: 'user',
  password: 'pass',
})
```

```python title="Python"
Template().from_image(
    image="ubuntu:22.04",
    username="user",
    password="pass",
)
```
</CodeGroup>

## GCP Artifact Registry

<CodeGroup>
```typescript title="JavaScript & TypeScript"
// From file path
Template().fromGCPRegistry('ubuntu:22.04', {
  serviceAccountJSON: './service_account.json',
})

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

```python title="Python"
# From file path
Template().from_gcp_registry(
    image="ubuntu:22.04",
    service_account_json="./service_account.json",
)

# From object
Template().from_gcp_registry(
    image="ubuntu:22.04",
    service_account_json={"project_id": "123", "private_key_id": "456"},
)
```
</CodeGroup>

## AWS ECR

<CodeGroup>
```typescript title="JavaScript & TypeScript"
Template().fromAWSRegistry('ubuntu:22.04', {
  accessKeyId: '123',
  secretAccessKey: '456',
  region: 'us-west-1',
})
```

```python title="Python"
Template().from_aws_registry(
    image="ubuntu:22.04",
    access_key_id="123",
    secret_access_key="456",
    region="us-west-1",
)
```
</CodeGroup>
