fernandoteixxeira/stark-bank-challenge/docker-compose

Claude Code and agent skill by fernandoteixxeira/stark-bank-challenge

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when composing multi-container setups — service dependencies and healthchecks, network aliases, variable substitution and .env, exit codes from a one-shot job, and volumes.

Install

npx vskill@latest install fernandoteixxeira/stark-bank-challenge/docker-compose

SKILL.md

The same SKILL.md was published earlier as fernandoteixxeira/stark-bank-challenge/docker-compose.

Docker Compose

Runs several containers together. For the image itself see dockerfile; for containers started from a test see testcontainers.

Dependencies Are Not Readiness

depends_on alone waits for the container to start, not for the process inside to be ready. That is a race, and it is the usual cause of "works on my machine".

yaml
services:
dependency:
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:8080/health"]
interval: 2s
timeout: 3s
retries: 15
app:
depends_on:
dependency:
condition: service_healthy

For a one-shot container that must finish first, use condition: service_completed_successfully.

Exit Codes Lie by Default

sh
docker compose up --abort-on-container-exit --exit-code-from app

--exit-code-from app reports 0 when `app` never ran at all — for example because its dependency failed a healthcheck. A CI step that trusts it reports green for a run that did not happen.

Read the container's own status instead:

sh
docker compose up --build --abort-on-container-exit --exit-code-from app
docker compose ps -a --format json app | jq -r 'if .State == "exited" then .ExitCode else "did-not-run" end'

Anything other than 0 is a failure, including the container never being created.

Network Aliases

yaml
services:
mock:
networks:
default:
aliases:
- some.host.name

Every container on that network now resolves some.host.name to mock. This is how a client with a compiled-in host is redirected without touching its configuration — see tls-local-mocking, since https needs the certificate to follow.

Aliases work container to container. A process on the host resolves through the host's own resolver and is unaffected.

Variables and .env

Compose substitutes ${VAR} from the environment and from .env in the project directory, before the file is parsed.

yaml
environment:
OPTIONAL: "${OPTIONAL:-a default}"
REQUIRED: "${REQUIRED:?a message naming what to set}"

:? fails the run at parse time with your message. Use it for anything whose absence would otherwise become a confusing error from inside the container.

Quote the value when the message contains a colon. YAML reads KEY: ${VAR:?run: this command} as a nested mapping and fails with mapping values are not allowed in this context, pointing at the line rather than at the colon.

Note the difference between the two ways a variable reaches a container:

  • ${VAR} in the compose file — substituted by Compose, reads .env automatically.
  • env_file: — passed straight to the container, no substitution and no multi-line values. A PEM does not fit; base64 does.

Multiple Compose Files

docker compose -f other-compose.yml up selects a different file. Useful when one setup is safe and another is not — a mock that cannot reach the real service, versus one that can and will.

Prefer that split over a flag. A file that reaches production is a file worth being hard to run by reflex, and worth keeping out of the repository if the credentials are not there either.

Volumes

yaml
volumes:
- ./file:/in/container:ro # bind mount, host ownership preserved

A bind-mounted file keeps its host UID and mode. A mode-600 file owned by you is unreadable to a container running as its own non-root user, and the process reports whatever it does when a file is missing — rarely "permission denied".

Always :ro for anything the container should not write.

Review Checklist

  • depends_on uses a condition, not the bare form.
  • CI reads the container's exit status, not Compose's.
  • Required variables use :? with a message that names the fix.
  • Values containing a colon are quoted.
  • Bind-mounted files are readable by the container's user.
  • A compose that can reach production is separate, and named so nobody runs it by accident.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/fernandoteixxeira/stark-bank-challenge/docker-compose/badge)](https://verified-skill.com/skills/fernandoteixxeira/stark-bank-challenge/docker-compose)

Something wrong with this skill or its page? Tell us.