# Update Base Tag

> Update TAG ARG in Dockerfile to latest veecode/devportal-base release Use when this capability is needed.

- Skill: `tomevault-io/update-base-tag` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/update-base-tag`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/update-base-tag/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/update-base-tag

---


# Update Base Tag

Update the `TAG` ARG in the Dockerfile to the latest semver release of `veecode/devportal-base`.

## Instructions

1. **Fetch tags from Docker Hub** (paginated)

   Docker Hub returns at most 100 tags per page. Use WebFetch to query the
   first page, then check the `next` field in the response for additional pages:

   ```pre
   URL: https://hub.docker.com/v2/repositories/veecode/devportal-base/tags/?page_size=100&ordering=last_updated
   Prompt: List all semver tags (X.Y.Z format, no suffixes like -amd64 or -arm64). Also return the "next" URL if present.
   ```

   If the response contains a `next` URL, fetch that page too and repeat until
   there are no more pages. Collect all tag names across all pages.

2. **Filter and sort by semver**

   - Filter tags that match semver pattern: `X.Y.Z` (e.g., `1.2.3`, `1.1.70`)
   - Exclude tags like `latest`, `dev`, `main`, or any non-numeric tags
   - Sort tags by semver (major, minor, patch) in descending order
   - Select the highest version as the latest
   - If no valid semver tags are found, abort with an error

3. **Read the current Dockerfile**

   Read the Dockerfile in the project root and find the current `TAG` value in the `ARG TAG=X.Y.Z` line.

4. **Compare versions**

   - If the latest Docker Hub tag is newer than the current TAG, update it
   - If they are the same, report that the Dockerfile is already up to date

5. **Update the Dockerfile**

   Use the Edit tool to replace the `ARG TAG=` line with the new version:

   ```dockerfile
   ARG TAG=<latest_version>
   ```

6. **Report the result**

   Output a summary:

   - Previous version
   - New version (or "already up to date")
   - The full tag that was found

## Example Output

```pre
Updated TAG in Dockerfile:
  Previous: 1.1.70
  New:      1.2.0
```

Or if already current:

```pre
Dockerfile is already up to date with TAG=1.1.70
```

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/veecode-platform) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

