Thanks for your interest in contributing! This document provides guidelines for contributing to Simple Docker Manager.
- Rust (latest stable version)
- Docker installed and running
- Access to Docker daemon (usually requires being in the
dockergroup on Linux) - just command runner (recommended)
- Git
-
Fork and clone the repository:
git clone https://github.com/OscillateLabsLLC/simple-docker-manager cd simple-docker-manager -
Install just (task runner):
# macOS brew install just # Linux cargo install just # Windows cargo install just
-
Copy the environment configuration:
cp env.example .env
-
Build the project:
cargo build
-
Run the development server:
cargo run
The application will be available at
http://localhost:3000.
simple-docker-manager/
├── src/
│ ├── main.rs # Application entry point with 12-Factor setup
│ ├── config.rs # Environment-based configuration
│ ├── web.rs # Web routes and handlers
│ ├── docker.rs # Docker API integration
│ └── models.rs # Data structures
├── templates/ # HTML templates
├── static/ # CSS, JavaScript, and static assets
├── Dockerfile # Multi-stage Docker build
├── docker-compose.yml # Compose configuration
├── docker-build.sh # Build script with options
├── justfile # Task runner commands
└── README.md # Project documentation
- Follow standard Rust conventions
- Run
cargo fmtbefore committing - Run
cargo clippyto catch common mistakes - Use meaningful variable names
- Add comments for complex logic
- Document public APIs with doc comments
This project provides web-based control over Docker containers. Security is paramount:
- Never disable authentication in production
- Always validate user input
- Review Docker socket access patterns
- Run security checks before committing:
just security-allorjust security-quick - See SECURITY.md for detailed security guidelines
- Add tests for new functionality
- Ensure all tests pass:
cargo test - Run security checks:
just security-quick - Test coverage is tracked but no hard minimums — focus on testing critical paths
# Run all tests
cargo test
# Run tests with output
cargo test -- --nocapture
# Run a specific test
cargo test test_name
# Run tests with coverage (requires cargo-llvm-cov)
cargo llvm-cov --html- Unit tests: In the same file as the code being tested, in a
#[cfg(test)]module - Integration tests: In the
tests/directory for end-to-end scenarios - Mock external dependencies: Docker API calls should be mockable for testing
We use Conventional Commits for automatic changelog generation:
feat: add container log export functionality
fix: resolve authentication timeout issue
docs: update deployment instructions
test: add tests for metrics collection
chore: update dependencies
Common prefixes:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changestest:- Test additions or modificationsrefactor:- Code refactoringperf:- Performance improvementschore:- Maintenance tasksci:- CI/CD changesbuild:- Build system changes
- Create a feature branch:
git checkout -b feat/my-feature - Make your changes
- Add tests
- Run
cargo fmtandcargo clippy - Run
cargo test - Run
just security-quick(orjust security-allif you have all tools installed) - Commit with conventional commit messages
- Push to your fork
- Open a pull request
PR Guidelines:
- Keep PRs focused on a single concern
- Include tests for new functionality
- Update documentation as needed
- Ensure CI checks pass
- Respond to review feedback promptly
- Increase test coverage for core modules
- Add integration tests for web endpoints
- Improve error handling and user feedback
- Add container exec functionality
- Performance optimization for metrics collection
- Add support for Docker Compose projects
- Implement container search/filtering
- Add support for Docker networks and volumes
- Improve mobile responsiveness
- Add dark mode toggle
- Video tutorials for deployment
- More usage examples
- Troubleshooting guide expansion
- API documentation
We provide a justfile for running security checks locally:
# Run all security checks (matches CI)
just
# Quick security check (Rust only)
just security-quick
# Individual checks
just rust-security # Cargo audit + deny
just container-security # Docker security tests
just secret-scan # GitLeaks (if installed)
just policy-check # Security policy validation
# Install required security tools
just install-tools
# Show available commands
just --list# Run with debug logging
SDM_LOG_LEVEL=debug cargo run
# Run with custom configuration
SDM_PORT=8080 SDM_METRICS_INTERVAL_SECONDS=10 cargo run
# Watch for changes and rebuild (requires cargo-watch)
cargo watch -x run# Build optimized binary
cargo build --release
# The binary will be in target/release/simple-docker-manager
./target/release/simple-docker-manager# Build Docker image
./docker-build.sh
# Build and run
./docker-build.sh --run
# Build with custom tag
./docker-build.sh --tag v1.0.0
# See all options
./docker-build.sh --helpConfiguration is exclusively via environment variables to support containerized deployments and cloud-native patterns.
We prioritize battle-tested, minimal dependencies to reduce attack surface and maintenance burden.
- Non-root container execution
- Read-only Docker socket mounting
- Scratch-based container images
- Argon2 password hashing
- Mandatory authentication by default
- HTML templates separate from Rust code
- Shared CSS for consistent design
- Clear module boundaries (config, web, docker, models)
- Open an issue for bugs or feature requests
- Check existing issues before creating new ones
- For security issues, see SECURITY.md
Be respectful and constructive. We're building a tool that manages critical infrastructure — professionalism and clear communication are essential.
By contributing, you agree that your contributions will be licensed under the MIT License.