captnio/captn

By captnio

โ€ขUpdated about 1 month ago

Keep your containers up-to-date with confidence and control.

Image
Integration & delivery
Developer tools
0

10K+

captnio/captn repository overview

captn logo

โ captn

Intelligent Container Updater


captn is an intelligent, rule-based container updater that automatically manages container updates using semantic versioning and registry metadata.
Keep your containers up-to-date with confidence and control.

Docker Pulls GitHub release (latest by date) License: AGPL v3

โ โœจ Features

  • ๐ŸŽฏ Rule-Driven Updates - Define custom update policies for different containers
  • ๐ŸŒ Multi-Registry Support - Docker Hub, GitHub Container Registry
  • ๐Ÿ“ˆ Progressive Upgrades - Apply multiple updates in sequence
  • ๐Ÿ‘€ Dry-Run Mode - Preview changes before applying them
  • ๐Ÿ“ฐ Notifications - Get notified about update status and results via Telegram and E-Mail
  • ๐Ÿงน Automatic Cleanup - Remove unused images and old backup containers
  • ๐Ÿ“Š Comprehensive Logging - Detailed logging with configurable levels
  • โฎ๏ธ Rollback Support - Automatic rollback on container startup and custom post-script failures
  • โฐ Scheduled Execution - Built-in scheduler with cron expression support

โ ๐Ÿšง Development Status

Note: This project is currently in an early and active development phase. While captn is functional and ready for testing, we're continuously improving and adding new features.

โš ๏ธ Docker Compose: captn has been developed and tested exclusively with containers created via docker run commands. Docker Compose support is currently untested and may not work as expected. If you're using Docker Compose and encounter issues, please report them so we may improve compatibility if possible.

We welcome testers and contributors! If you'd like to help shape captn, we're especially looking for contributions in:

  • ๐Ÿ“ Documentation - Help improve guides, examples, and explanations
  • ๐Ÿงช Testing - Test captn in different environments and report issues
  • ๐Ÿ—๏ธ Repository Optimization - Create wiki pages, issue templates, and improve project structure

Your feedback and contributions are highly valued as we work towards a stable release!

โ ๐Ÿš€ Quick Start

โ 1. Create Directories
# Create directories for configuration and log files
mkdir -p ~/captn/{conf,logs}
โ 2. Run captn Container
# Run captn container with proper volume mounts
docker run -d \
  --name captn \
  --restart unless-stopped \
  -e TZ=Europe/Berlin \
  -v /etc/localtime:/etc/localtime:ro \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v ~/captn/conf:/app/conf \
  -v ~/captn/logs:/app/logs \
  captnio/captn:0.9.0
โ 3. First Run (Dry-Run Mode)

By default, captn runs in normal mode but all containers are assigned to the default rule which does not allow any updates at all for safety reasons. To get a preview of what captn would do, you can:

  1. Assign containers to different rules in the configuration file

  2. Run in dry-run mode to see what would be updated:

    # Preview what would be updated
    docker exec captn captn --dry-run
    
    # Run actual updates (after reviewing dry-run results)
    docker exec captn captn
    

โ ๐Ÿ”ง Advanced Features

โ Pre/Post Scripts

captn supports executing custom scripts before and after updates:

  • Pre-scripts: Run before container updates (backups, health checks)
  • Post-scripts: Run after successful updates (verification, notifications, customizations, post-update or cleanup tasks)
  • Container-specific: Scripts can be tailored to specific containers
  • Failure handling: Configure whether to continue or skip/rollback on script failures
โ Notifications

Get updates about captn's activities:

  • Update status and results
  • Error notifications
  • Summary reports
โ Currently supported notification methods
  • Telegram: Quick update summaries via Telegram Bot API
  • E-Mail: SMTP-based email notifications with detailed HTML reports

โ ๐Ÿ“š Documentation

For detailed configuration options, advanced usage, and troubleshooting, please refer to:

โ ๐Ÿค Contributing

We welcome contributions! captn is in active development and we're particularly interested in:

  • Documentation improvements - Enhance existing docs, add examples, create tutorials
  • Testing and bug reports - Help us identify and fix issues
  • Repository infrastructure - Help create wiki pages, issue templates, PR templates, and improve project organization
  • Code contributions - New features, optimizations, and bug fixes

Feel free to open an issue to discuss your ideas or submit a pull request directly. Every contribution, no matter how small, is appreciated!

โ ๐Ÿ“„ License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) - see the LICENSEโ  file for details.

โ ๐Ÿ’ฌ Support


โš ๏ธ Important: Always test with --dry-run first to understand what captn will do before running actual updates.

Brewed with โค๏ธ and loads of ๐Ÿบ

GitHubโ  โ€ข Docker Hubโ  โ€ข Issuesโ 

Tag summary

Content type

Image

Digest

sha256:146cf1fb2โ€ฆ

Size

47 MB

Last updated

about 1 month ago

docker pull captnio/captn:dev-0.10.0