Back to list
tstapler

docker-build-test

by tstapler

Tyler Stapler's dotfiles

5🍴 1📅 Jan 2, 2026

SKILL.md


name: docker-build-test description: Docker build and test workflow with mandatory pre-push validation checklist to prevent CI/CD failures

Docker Build & Test

Local Docker testing workflow to prevent CI/CD failures. CRITICAL: Always run make validate before pushing.

Pre-Push Checklist (MANDATORY)

Before pushing ANY Docker-related changes:

  • make validate passes completely
  • No build errors or warnings
  • Smoke tests pass
  • Image sizes verified
  • Clean validation from scratch

Quick Start

# Complete validation (ALWAYS run before push)
make validate

# Build and test everything
make all

# Clean and rebuild
make clean && make validate

Build Commands

# Build both images
make build

# Build individual images
make build-healthcheck
make build-pgbouncer

Test Commands

# Test both images
make test

# Test individual images
make test-healthcheck
make test-pgbouncer

Validation Pipeline

# 1. Complete validation (recommended)
make validate

# 2. Check for errors
make build 2>&1 | grep -i error

# 3. Verify functionality
make test

# 4. Check image sizes
make info

# 5. Clean validation
make clean && make validate

Manual Docker Commands (Fallback)

# Build
docker build -f Dockerfile.healthcheck -t pgbouncer-healthcheck:latest .
docker build -f Dockerfile.pgbouncer -t pgbouncer:latest .

# Test
docker run --rm pgbouncer-healthcheck:latest /usr/local/bin/healthcheck-unified.py --help
docker run --rm pgbouncer:latest /usr/local/bin/pgbouncer --version

# Check sizes
docker images | grep -E "(pgbouncer-healthcheck|pgbouncer)"

Troubleshooting

IssueSolution
Docker daemon not runningStart Docker Desktop
Permission deniedVerify Docker access: docker info
Build failuresUse make debug for verbose output
Disk spaceUse make clean-all

Debug Commands

# Verbose debugging
make debug

# Check prerequisites
make check

# Build with no cache
docker build --no-cache -f Dockerfile.pgbouncer -t pgbouncer:debug .

# Check layers
docker history pgbouncer:latest

Command Reference

CommandPurpose
make validateComplete validation pipeline
make allBuild and test everything
make buildBuild both images
make testTest both images
make infoShow image information
make cleanRemove local images
make debugBuild with verbose output
make checkCheck prerequisites
make pushPush to ECR (requires AWS auth)

Key Principles

  • Simple and reliable - standard Docker + Make workflow
  • No complex tooling - just Docker + Make (built-in)
  • Easy debugging - familiar Docker commands
  • CI/CD compatible - same commands locally and in pipelines

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon