> ## Documentation Index
> Fetch the complete documentation index at: https://docs.talosjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# docker:publish

> Build and push a package or module Docker image to Docker Hub.

Build and push container images for packages and modules that ship a `Dockerfile`. The command logs in once with your saved credentials, then for each target builds the image with `docker build` and pushes it with `docker push`, tagged `<username>/<name>:<tag>`. Targets without a `Dockerfile` are skipped.

Publishing requires Docker credentials saved with [`docker:credentials:create`](/cli/commands/docker-credentials-create).

## Usage

```bash theme={null}
talos docker:publish [options]
```

## Examples

Build and push every package and module that has a `Dockerfile`:

```bash theme={null}
talos docker:publish
```

Publish specific packages (comma-separated):

```bash theme={null}
talos docker:publish --packages=gateway,worker
```

Publish specific modules:

```bash theme={null}
talos docker:publish --modules=billing,catalog
```

Override the image tag (defaults to the `package.json` version, else `latest`):

```bash theme={null}
talos docker:publish --modules=billing --tag=edge
```

## Options

| Option       | Description                                                   | Default                               |
| ------------ | ------------------------------------------------------------- | ------------------------------------- |
| `--packages` | Comma-separated package names to publish (under `packages/`). | All packages and modules              |
| `--modules`  | Comma-separated module names to publish (under `modules/`).   | All packages and modules              |
| `--tag`      | Image tag to build and push.                                  | `package.json` version, else `latest` |
| `--silent`   | Suppress log output and the publishing spinner.               | `false`                               |

With neither `--packages` nor `--modules`, every directory under `packages/` and `modules/` is treated as a candidate. Only those that ship a `Dockerfile` are built: a discovered target without one is reported as ignored, while an explicitly named target without one is an error. For any registry other than `docker.io`, the image reference is prefixed with the registry host (for example `ghcr.io/ooneex/gateway:1.2.0`). At the end the command prints a summary of how many targets were published versus ignored.

See [Publish to Docker Hub](/deployment/docker) for the full workflow, including CI setup.
