> ## Documentation Index
> Fetch the complete documentation index at: https://runpod-b18f5ded-public-endpoints.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

Templates are Docker containers images paired with a configuration.

They are used to launch images as Pods, define the required container disk size, volume, volume paths, and ports needed.

You can also define environment variables within the Template.

## Template types

There a few types of Templates:

* **Managed by Runpod**: Also known as official Templates; these templates are created and maintained by Runpod.

* **Custom Templates**:

  * **Community Templates**: Custom Templates shared by the community.
  * **Private Templates**: Custom Templates created by you or if using a team account, shared inside your team.

### Custom Templates

### Customizing Container Start Command

You can customize the Docker command to run additional commands or modify the default behavior.

The Docker command is specified in the **Container Start Command** field.

**Default Docker Command**

The default Docker command is:

```sh theme={"system"}
bash -c '/start.sh'
```

This command runs the `/start.sh` script at the end of the container startup process.

You can customize the Docker command to run additional commands or modify the default behavior.

For example, you can add a command to run before `/start.sh`:

```sh theme={"system"}
bash -c 'mkdir /testdir1 && /start.sh'
```

This command creates a directory `/testdir1` before running `/start.sh`.

**Using the `entrypoint` Field**

You can also specify a JSON string with `cmd` and `entrypoint` as the keys.

The `entrypoint` field allows you to specify a command to run at the beginning of the container startup process. For example:

```json theme={"system"}
{ "cmd": ["echo foo && /start.sh"], "entrypoint": ["bash", "-c"] }
```

This command runs the `echo` command and then runs `/start.sh`.

**Important Considerations**

When using the `entrypoint` field, be aware that the command will run twice: once as the entrypoint and again as part of the `cmd` field.

This can cause issues if the command errors when run a second time. For example:

```json theme={"system"}
{ "cmd": ["mkdir /testdir11 && /start.sh"], "entrypoint": ["bash", "-c"] }
```

This command will run `mkdir` twice, which can cause errors if the directory already exists.

**Tips and Examples**

Here are some working examples to try in dev:

* Command only: `bash -c 'mkdir /testdir1 && /start.sh'`
* Command only: `{"cmd": ["bash", "-c", "mkdir /testdir8 && /start.sh"]}`
* Command and Entrypoint: `{"cmd": ["test-echo-test-echo"], "entrypoint": ["echo"]}`
* Command and Entrypoint: `{"cmd": ["mkdir -p /testdir12 && /start.sh"], "entrypoint": ["bash", "-c"]}`

<Info>
  Remember to use `mkdir -p` to avoid errors when creating directories.
</Info>
