Why this matters
Fast-fails misconfigurations and prevents undefined behavior in production.
Validate required runtime env vars at container start via an entrypoint script; exit with a clear message on missing values.
Fast-fails misconfigurations and prevents undefined behavior in production.
Side-by-side examples engineers can pattern-match during review.
CMD ["node","dist/index.js"] # assumes GITHUB_TOKEN existsCOPY docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["node","dist/index.js"]
# entrypoint.sh
# !/usr/bin/env sh
set -eu
: "${GITHUB_TOKEN:?GITHUB_TOKEN is required}"
exec "$@"exec app # no checks: "${API_KEY:?API_KEY is required}" && exec appFrom the same buckets as this rule.