Skip to content
Back to skills

Docker Database Package Copy

ASecurity

When adding or changing TypeScript under the shared database package that index.ts re-exports, update every service Dockerfile's COPY list or the container build fails with TS2307. Use for database-package modules, Dockerfile edits, or "works locally but the container build breaks".

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 2, 2026
ai-agentstypescriptbashdockerdatabase

Works with

  • cursor
  • cli

Security analysis

A100/100

Scanned September 2, 2026

npx -y skills add eric-sabe/engsys --skill docker-database-package-copy --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Docker Database Package Copy?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Docker Database Package Copy
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/eric-sabe-docker-database-package-copy/badge)](https://www.skillsdirectory.com/skills/eric-sabe-docker-database-package-copy)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: docker-database-package-copy
description: When adding or changing TypeScript under the shared database package that index.ts re-exports, update every service Dockerfile's COPY list or the container build fails with TS2307. Use for database-package modules, Dockerfile edits, or "works locally but the container build breaks".
---

# Docker COPY list for the shared database package

Applies to monorepos where a shared Prisma/database package is consumed by multiple containerized services, and each service Dockerfile copies **specific** source files (not the whole tree).

> Naturalize: replace `services/database` with this repo's database-package path and the package name in `CLAUDE.md`.

## Trigger

- New or renamed source file under the database package **reachable from** its `index.ts`.
- A PR touches the database package's `index.ts` **and** a service `Dockerfile`.

## Do this

1. Find every Dockerfile that copies database sources:
   ```bash
   rg 'COPY services/database/' services -g Dockerfile
   ```
2. For each **new** source file the package needs, add **once per Dockerfile** that copies database sources:

   ```dockerfile
   COPY services/database/<filename>.ts ./services/database/
   ```

   Keep the block with the other `services/database/*.ts` COPY lines.

3. Prefer a quick smoke build before pushing:
   ```bash
   docker build -f services/<any-service>/Dockerfile -t probe .
   ```

## Why

Container images only contain explicitly copied files. A local `pnpm build` uses the full repo tree; **Docker does not**. A missing COPY line surfaces as `TS2307: Cannot find module '.../services/database/<file>'` in CI even though the local build passes.

**Doesn't apply to:** Prisma-only files, CLI-only scripts, anything under the database package that isn't re-exported via `index.ts`.

## Canonical doc

The pack's `claude.fragment.md` (and the rendered `CLAUDE.md`) carries the rest of the Prisma + Docker workflow. If the repo mirrors rules into a Cursor ruleset, keep them in sync.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.