Linking Docker Hub as a source

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

PostHog Wizard hedgehog

The Docker Hub connector syncs repositories, tags, and more into the PostHog data warehouse, so you can analyze them alongside your product data.

Prerequisites

Credentials that can read the data you want to sync. PostHog only reads data, so read access is enough.

Adding a data source

  1. In PostHog, go to the Sources tab of the data pipeline section.
  2. Click + New source and click Link next to this source.
  3. Enter your credentials (see Configuration below) and click Next.
  4. Select the tables you want to sync, choose a sync method and frequency, then click Import.

Once the syncs are complete, you can start querying this data in PostHog.

Enter your Docker Hub username and a personal access token to pull your container repositories and tags.

You can create a personal access token with Read access under Account settings → Personal access tokens in Docker Hub. To import an organization's repositories instead of your own, set the namespace field to the organization name.

You'll be asked for:

  • Username
  • Personal access token

Sync modes

Each table can be synced in one of several modes, depending on what the source supports:

  • Webhook (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
  • Incremental – only new or updated rows are synced on each run, using a cursor field (such as an updated_at timestamp). Cheaper than a full refresh, but deletes aren't captured.
  • Append only – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
  • Full refresh – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.

See sync methods for a full explanation of how each mode works and how to choose between them.

The audit_logs table supports incremental sync on timestamp. All other Docker Hub tables are full refresh only. Each full refresh sync replaces the contents of the table.

Configuration

OptionTypeRequired
UsernametextYes
Personal access tokenpasswordYes
NamespacetextNo

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
repositories

A container image repository in the configured Docker Hub namespace (user or organization).

Full refresh——
tags

A tag on a repository in the configured Docker Hub namespace, including its per-architecture images.

Full refresh——
org_members

A member of the configured Docker Hub organization, including pending invitees.

Full refresh——
org_groups

A group (team) in the configured Docker Hub organization.

Full refresh——
org_group_members

A user's membership in a group (team) of the configured Docker Hub organization. A user in several groups has one row per group.

Full refresh——
audit_logs

An audit log event for the configured Docker Hub organization, such as an image push, a permission change, or a deletion.

Incremental, Full refreshtimestamp—
audit_log_actions

The catalog of audit log action types, used to categorize and filter audit log events.

Full refresh——
repository_pulls

Weekly image pull counts for each repository in the configured namespace over the last 12 months, from the Docker Verified Publisher (DVP) Data API.

Full refresh——

Table availability

Not all tables are available for every namespace:

  • Organization tables – org_members, org_groups, org_group_members, audit_logs, and audit_log_actions require the namespace to be a Docker Hub organization. The token must belong to an owner of that organization.
  • repository_pulls – Only available for namespaces in the Docker Verified Publisher program. It syncs weekly pull and unique IP counts per repository for the last 12 months.

Troubleshooting

  • If the connection fails with an authorization error, the personal access token is wrong, expired, or has been revoked. Create a new one, then reconnect the source.
  • If a table syncs no rows, the credential may not have access to that data. Check its permissions, then reconnect the source.
  • If repository_pulls shows an error or is unavailable, the namespace may not be a Docker Verified Publisher. Verify the namespace is enrolled in the DVP program and that the token owner has access, then disable the table if it doesn't apply to your namespace.

If your sync is failing or data looks wrong, see the Data warehouse troubleshooting guide. If that doesn't help, contact support – we're happy to help.

Still have questions?

Was this page useful?