> Markdown version of https://tuna.am/en/docs/guides/install/install-containers/. Documentation index: [llms.txt](https://tuna.am/en/llms.txt), full text in one file: [llms-full.txt](https://tuna.am/en/llms-full.txt). Any page is available as Markdown: append `.md` to its URL without the trailing slash.

# Containers

The images run in Docker, Podman, Kubernetes and any other environment that runs OCI images: with Docker Compose, in CI and on servers where you don't want to install packages. The examples below use Docker; the commands are the same in Podman.

| Image                   | What's inside                                                                                                                      | Size    | Platforms                                                                                                                     |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `yuccastream/tuna`      | [tuna-cli](https://tuna.am/en/docs/guides/install/install-cli.md) on Alpine: full-featured tunnels and the rest of the platform    | \~13 MB | `linux/amd64`, `linux/arm64`, `linux/arm/v7`                                                                                  |
| `yuccastream/tuna-tiny` | [tuna-tiny](https://tuna.am/en/docs/guides/install/install-tiny.md) `FROM scratch`: a single HTTP or TCP tunnel without middleware | \~2 MB  | `linux/amd64`, `linux/arm64`, `linux/arm/v7`, `linux/arm/v6`, `linux/arm/v5`, `linux/riscv64`, `linux/ppc64le`, `linux/s390x` |

> **Tip.** In Kubernetes, the [Kubernetes operator](https://tuna.am/en/docs/guides/install/install-k8s-operator.md) is more convenient than a client container.

## Authentication

A container has no browser and no system keychain, so `tuna login` does not fit. Create an [API key](https://my.tuna.am/api_keys?lang=en) and pass it in the `TUNA_API_KEY` variable. For tunnels, the "For tunnels" preset is enough. More in [Sessions and API keys](https://tuna.am/en/docs/guides/sessions-and-api-keys.md#ci).

## Running

**tuna-cli**

```shell
docker pull yuccastream/tuna:latest

```

The container arguments are a `tuna` command:

```shell
docker run -d --name tuna --restart unless-stopped --network host \
  -e TUNA_API_KEY=<your_key> yuccastream/tuna http 3000

```

Docker Compose:

```yaml
---
services:
  whoami:
    image: traefik/whoami
    restart: always

  tuna:
    image: yuccastream/tuna:latest
    command: http whoami:80
    restart: always
    depends_on:
      - whoami
    environment:
      - TUNA_API_KEY=<your_key>

```

🖌 Authenticity verification

Starting from version **0.27.4**, all images are signed with [cosign](https://docs.sigstore.dev/). To verify the image, [install the cosign client](https://docs.sigstore.dev/cosign/system_config/installation/), download the public key and run the check.

```shell
curl -sSLfO https://releases.tuna.am/tuna-cosign.asc
cosign verify --key tuna-cosign.asc docker.io/yuccastream/tuna:0.27.4

```

**tuna-tiny**

```shell
docker pull yuccastream/tuna-tiny:latest

```

If Docker Hub is unavailable, the same image is mirrored at `code.tuna.am/tuna/tuna-tiny`.

The container arguments are a `tuna-tiny` command. Flags and their environment variables are on the [tuna-tiny page](https://tuna.am/en/docs/guides/install/install-tiny.md#usage): for example, `TUNA_SUBDOMAIN` instead of `-s`. The image holds only the binary, with no shell, and runs as user `65534`.

```shell
docker run -d --name tuna --restart unless-stopped --network host \
  -e TUNA_API_KEY=<your_key> yuccastream/tuna-tiny http 3000

```

Docker Compose:

```yaml
---
services:
  whoami:
    image: traefik/whoami
    restart: always

  tuna:
    image: yuccastream/tuna-tiny:latest
    command: http whoami:80
    restart: always
    depends_on:
      - whoami
    environment:
      - TUNA_API_KEY=<your_key>

```

Running it in a container on a MikroTik router is covered on the [tuna-tiny page](https://tuna.am/en/docs/guides/install/install-tiny.md?platform=mikrotik#installation).

🖌 Authenticity verification

The images are signed with [cosign](https://docs.sigstore.dev/). To verify, [install the cosign client](https://docs.sigstore.dev/cosign/system_config/installation/), download the public key and run the check.

```shell
curl -sSLfO https://releases.tuna.am/tuna-cosign.asc
cosign verify --key tuna-cosign.asc docker.io/yuccastream/tuna-tiny:latest

```

`--network host` lets the container reach a service on the host's `localhost`. Alternatively, attach the container to the service's network and use its name, as in the Docker Compose examples.

For Kubernetes without the operator, see the [Kubernetes](https://tuna.am/en/docs/tunnels/examples/kubernetes.md) example.
