# Agent Guidelines for Docker Registry Project ## Build & Run ```bash # Build and start services docker-compose up -d --build # Rebuild single service docker-compose up -d --build registry ``` ## Code Style - YAML files: 2 space indentation - Shell scripts: Follow [Google Shell Style Guide](https://google.github.io/styleguide/shellguide.html) - Docker best practices: - Use multi-stage builds when possible - Minimize layer size and number - Pin base image versions - Place volatile commands last - One service per container ## Error Handling - Shell scripts: Use set -e for strict error handling - Log errors to stdout/stderr for Docker logging - Follow the fail-fast principle - Include error context in messages ## File Structure ``` . ├── config.yml # Registry configuration ├── docker-compose.yml # Service orchestration ├── Dockerfile # Registry image build ├── entrypoint.sh # Container initialization └── setup.sh # Local environment setup ```