# docker tag: Name & Re-tag Images for Push

> How docker tag works: giving an image a registry/repository name and tag before push, multiple tags, and naming errors in CI.

Source: https://latchkey.dev/learn/command-reference/docker-tag-command  
Updated: 2026-06-25

Give an image the registry-qualified name it needs to be pushed.

docker tag creates an additional name (a reference) pointing at an existing image. It does not copy data. This page covers tagging for push and common naming mistakes.

## What it does

docker tag SOURCE TARGET adds a new tag/reference to an image. Both names point at the same image ID. You tag before push so the name encodes the destination registry and repository.

## Common usage

```Terminal
docker tag myapp:latest ghcr.io/owner/myapp:1.2.3
docker tag myapp:latest ghcr.io/owner/myapp:latest
docker tag abc123def ghcr.io/owner/myapp:sha-abc123
```

## Common errors in CI

"Error parsing reference: ... is not a valid repository/tag" usually means an uppercase letter in the repository path (registry repositories must be lowercase) or an invalid character. "No such image" means the SOURCE name or ID does not exist locally - build or pull it first. Tag names allow letters, digits, underscores, periods, and dashes, up to 128 characters.

## FAQ

### docker tag: Name & Re-tag Images for Push?

docker tag creates an additional name (a reference) pointing at an existing image. It does not copy data. This page covers tagging for push and common naming mistakes.

### What it does?

docker tag SOURCE TARGET adds a new tag/reference to an image. Both names point at the same image ID. You tag before push so the name encodes the destination registry and repository.

### Common errors in CI?

"Error parsing reference: ... is not a valid repository/tag" usually means an uppercase letter in the repository path (registry repositories must be lowercase) or an invalid character. "No such image" means the SOURCE name or ID does not exist locally - build or pull it first.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
