{"id":21423166,"url":"https://github.com/petervinter/manage_linux_docker_containers","last_synced_at":"2026-05-08T07:31:15.729Z","repository":{"id":263489086,"uuid":"890558610","full_name":"PeterVinter/Manage_linux_docker_containers","owner":"PeterVinter","description":"A robust solution for safely shutting down and starting up Docker containers on Linux systems.","archived":false,"fork":false,"pushed_at":"2024-11-20T19:33:17.000Z","size":101,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-03T23:48:00.901Z","etag":null,"topics":["automation","bash","code-of-conduct","container-management","devops","docker","linux","shell-script","system-administration"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PeterVinter.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-18T19:27:20.000Z","updated_at":"2024-11-20T19:33:21.000Z","dependencies_parsed_at":"2025-06-02T21:50:05.300Z","dependency_job_id":null,"html_url":"https://github.com/PeterVinter/Manage_linux_docker_containers","commit_stats":null,"previous_names":["petervinter/linux_docker_container_shutdown","petervinter/manage_linux_docker_containers"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/PeterVinter/Manage_linux_docker_containers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterVinter%2FManage_linux_docker_containers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterVinter%2FManage_linux_docker_containers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterVinter%2FManage_linux_docker_containers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterVinter%2FManage_linux_docker_containers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PeterVinter","download_url":"https://codeload.github.com/PeterVinter/Manage_linux_docker_containers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterVinter%2FManage_linux_docker_containers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273017168,"owners_count":25031590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","bash","code-of-conduct","container-management","devops","docker","linux","shell-script","system-administration"],"created_at":"2024-11-22T21:14:37.171Z","updated_at":"2026-05-08T07:31:15.694Z","avatar_url":"https://github.com/PeterVinter.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Container Management\n\n![License](https://img.shields.io/github/license/PeterVinter/Manage_linux_docker_containers)\n![Last Commit](https://img.shields.io/github/last-commit/PeterVinter/Manage_linux_docker_containers)\n![Stars](https://img.shields.io/github/stars/PeterVinter/Manage_linux_docker_containers)\n![Issues](https://img.shields.io/github/issues/PeterVinter/Manage_linux_docker_containers)\n![Docker](https://img.shields.io/badge/Docker-2496ED?style=flat\u0026logo=docker\u0026logoColor=white)\n![Bash](https://img.shields.io/badge/Bash-4EAA25?style=flat\u0026logo=gnu-bash\u0026logoColor=white)\n[![CI](https://github.com/PeterVinter/Manage_linux_docker_containers/actions/workflows/ci.yml/badge.svg)](https://github.com/PeterVinter/Manage_linux_docker_containers/actions/workflows/ci.yml)\n[![Release](https://github.com/PeterVinter/Manage_linux_docker_containers/actions/workflows/release.yml/badge.svg)](https://github.com/PeterVinter/Manage_linux_docker_containers/actions/workflows/release.yml)\n[![Maintenance](https://img.shields.io/maintenance/yes/2024)](https://github.com/PeterVinter/Manage_linux_docker_containers/graphs/commit-activity)\n![Tests](https://img.shields.io/badge/Tests-Passing-success)\n[![made-with-bash](https://img.shields.io/badge/Made%20with-Bash-1f425f.svg)](https://www.gnu.org/software/bash/)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://makeapullrequest.com)\n[![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FPeterVinter%2FManage_linux_docker_containers\u0026count_bg=%2379C83D\u0026title_bg=%23555555\u0026icon=\u0026icon_color=%23E7E7E7\u0026title=hits\u0026edge_flat=false)](https://hits.seeyoufarm.com)\n[![Changelog Update](https://github.com/PeterVinter/Manage_linux_docker_containers/actions/workflows/update-changelog.yml/badge.svg)](https://github.com/PeterVinter/Manage_linux_docker_containers/actions/workflows/update-changelog.yml)\n\nA comprehensive solution for managing Docker containers on Linux systems, including safe shutdown, startup, and monitoring capabilities.\n\n## Features\n\n- Safely shuts down Docker containers\n- Handles graceful termination of processes\n- Supports custom shutdown scripts\n- Automated changelog generation\n- Comprehensive documentation\n\n## Features\n\n- Safe shutdown of Docker containers with proper cleanup\n- Automatic container startup on system boot\n- Detailed logging of all operations\n- Error handling and recovery\n- Container status monitoring\n- Performance optimization\n\n## Prerequisites\n\n- Linux operating system\n- Docker installed and running\n- Bash shell (version 4.0+)\n- Root or sudo privileges\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/PeterVinter/Manage_linux_docker_containers.git\ncd Manage_linux_docker_containers\n```\n\n2. Make the scripts executable:\n```bash\nchmod +x *.sh\n```\n\n## Usage\n\n### Starting Containers\n```bash\n./startup_docker_container.sh\n```\n\n### Shutting Down Containers\n```bash\n./docker_safe_shutdown.sh\n```\n\n## Configuration\n\nThe scripts can be configured by modifying the following variables:\n\n- `TIMEOUT`: Maximum time to wait for container shutdown\n- `LOG_FILE`: Location of log files\n- `CONTAINER_LIST`: List of containers to manage\n\n## Logging\n\nLogs are stored in:\n- `startup_logs.txt`: Container startup logs\n- `shutdowns_logs.txt`: Container shutdown logs\n- `shutdowned.txt`: Status of shutdown containers\n\n## Development\n\n### Branch Structure\n\nThis repository follows a simplified GitFlow workflow with two main branches:\n\n- `main`: The stable branch containing production-ready code\n  - All releases are tagged from this branch\n  - Protected branch requiring PR reviews\n  - Must pass all CI checks before merging\n\n- `develop`: The development branch where features are integrated\n  - All feature branches merge here first\n  - Contains latest development changes\n  - Must pass CI checks before merging\n\n#### Working with Branches\n\n1. Feature Development\n   ```bash\n   git checkout develop\n   git checkout -b feature/your-feature\n   # Make your changes\n   git push origin feature/your-feature\n   # Create PR to develop\n   ```\n\n2. Bug Fixes\n   ```bash\n   git checkout develop\n   git checkout -b fix/bug-description\n   # Fix the bug\n   git push origin fix/bug-description\n   # Create PR to develop\n   ```\n\n3. Release Process\n   - Features are merged into `develop`\n   - When ready for release, `develop` is merged into `main`\n   - Release tags are created from `main`\n\n### Project Management\n\nThis project uses GitHub's project management features to track issues, pull requests, and milestones. We follow a structured workflow:\n\n1. **Issues**: Used to track bugs, feature requests, and tasks\n2. **Pull Requests**: Follow our [contribution guidelines](CONTRIBUTING.md)\n3. **Milestones**: Group related issues and PRs for releases\n4. **Project Board**: Visual kanban board for task tracking\n5. **Automated Changelog**: Updates via GitHub Actions on PR merges\n\nOur changelog follows the [Keep a Changelog](https://keepachangelog.com/) format and is automatically updated when PRs are merged.\n\n### Changelog Management\n\nThis repository uses automated changelog generation through GitHub Actions. When you create a PR:\n\n1. Use conventional commit format in PR titles:\n   - `feat:` for new features (increments minor version)\n   - `fix:` for bug fixes (increments patch version)\n   - `feat!:` or include `BREAKING CHANGE` for breaking changes (increments major version)\n   - `docs:` for documentation changes\n   - `refactor:` for code changes that neither fix bugs nor add features\n\n2. The workflow will automatically:\n   - Skip changelog updates for changelog-only PRs\n   - Create a new changelog entry based on your PR title and description\n   - Increment version number according to semantic versioning\n   - Create a new PR with the changelog update\n\n### Automated Changelog\n\nThis project uses an automated changelog workflow that:\n- Updates CHANGELOG.md when PRs are merged to main\n- Follows [Semantic Versioning](https://semver.org/) for version numbers:\n  - Major (X.0.0): Breaking changes (feat! or BREAKING CHANGE)\n  - Minor (0.X.0): New features (feat)\n  - Patch (0.0.X): Bug fixes and small changes\n- Determines change type from PR title:\n  - `feat:` → Added (new features)\n  - `fix:` → Fixed (bug fixes)\n  - `docs:` → Documentation\n  - `refactor:` → Changed\n  - `security:` → Security\n  - `feat!:` or `BREAKING CHANGE` → Breaking Change\n- Creates a new PR with changelog updates\n- Follows [Keep a Changelog](https://keepachangelog.com/) format\n\nFor detailed workflow documentation, see [GitHub CLI Workflow Guide](docs/github_cli_workflow.md).\n\n### Automated Releases\n\nThis project uses GitHub Actions for automated releases. The workflow is triggered when a new tag is pushed and includes:\n\n1. Automated Changelog Generation:\n   - Generates changelog from commit messages\n   - Includes commit hashes for reference\n   - Groups changes by type\n\n2. Quality Checks:\n   - Runs ShellCheck on all scripts\n   - Validates syntax and best practices\n   - Ensures code quality before release\n\n3. Release Creation:\n   - Creates GitHub release automatically\n   - Includes generated changelog\n   - Adds feature list and installation instructions\n\nTo create a new release:\n\n1. Make your changes and commit them:\n```bash\ngit add .\ngit commit -m \"feat: your feature description\"\n```\n\n2. Create and push a new tag:\n```bash\ngit tag -a v1.x.x -m \"Release description\"\ngit push origin v1.x.x\n```\n\nThe workflow will automatically:\n- Generate the changelog\n- Run quality checks\n- Create the release\n- Update documentation\n\n### Commit Messages\n\nFollow the [Conventional Commits](https://www.conventionalcommits.org/) specification:\n- `feat:` New features\n- `fix:` Bug fixes\n- `docs:` Documentation changes\n- `chore:` Maintenance tasks\n- `refactor:` Code improvements\n- `test:` Test updates\n\n### Development Workflow\n\nOur project follows a structured branching strategy to maintain code quality and automate changelog updates. Here's how to work with our workflow:\n\n#### Branch Structure\n- `main`: Production-ready code\n- `develop`: Integration branch for features\n- `feature/*`: Individual feature branches\n- `fix/*`: Bug fix branches\n- `docs/*`: Documentation updates\n\n#### Making Changes\n\n1. **Create Feature Branch**\n   ```bash\n   # For new features\n   git checkout develop\n   git pull origin develop\n   git checkout -b feature/your-feature-name\n\n   # For documentation changes\n   git checkout develop\n   git pull origin develop\n   git checkout -b docs/update-description\n   ```\n\n2. **Make Changes**\n   - Follow commit message conventions:\n     - `feat:` for new features\n     - `fix:` for bug fixes\n     - `docs:` for documentation\n     - `!` or `BREAKING CHANGE` for breaking changes\n   \n   Example commit messages:\n   ```bash\n   git commit -m \"feat: add new container logging\"\n   git commit -m \"fix: resolve startup script issue\"\n   git commit -m \"docs: update workflow guide\"\n   git commit -m \"feat!: change API response format\"\n   ```\n\n3. **Push Changes**\n   ```bash\n   git push origin your-branch-name\n   ```\n\n4. **Create Pull Request**\n   - Create PR to `develop` branch\n   - Use descriptive title following commit conventions\n   - Fill out PR template\n   - Request review if needed\n\n5. **Merge to Develop**\n   - Ensure CI passes\n   - Get approvals if required\n   - Merge using \"Merge commit\"\n\n6. **Release to Main**\n   - Create PR from `develop` to `main`\n   - Our workflow will:\n     - Auto-increment version based on changes\n     - Update changelog automatically\n     - Create release tag\n\n#### Changelog Process\n\nThe changelog is automatically updated through our GitHub Actions workflow. Here's the complete process:\n\n1. **Starting Development**\n   ```bash\n   # Always start from develop\n   git checkout develop\n   git pull origin develop\n   \n   # Create your feature branch\n   git checkout -b feature/your-feature\n   ```\n\n2. **Making Changes**\n   ```bash\n   # Make your changes\n   git add .\n   git commit -m \"type: description\"\n   git push origin feature/your-feature\n   ```\n\n3. **Pull Request Flow**\n   a. Feature to Develop:\n      - Create PR from your feature branch to develop\n      - Get review and approval\n      - Merge to develop\n   \n   b. Develop to Main:\n      - Create PR from develop to main\n      - Get review and approval\n      - Merge to main\n      - **IMPORTANT**: Wait for changelog PR\n   \n   c. Changelog Update:\n      - Automatic PR will be created\n      - Title will be: \"docs: update changelog for vX.Y.Z\"\n      - **MUST** merge this PR before new changes\n\n4. **Version Updates**\n   The workflow automatically determines version increments:\n   - Major (X.0.0): Breaking changes\n   - Minor (x.Y.0): New features\n   - Patch (x.y.Z): Bug fixes and docs\n\n5. **Important Notes**\n   - Never skip waiting for the changelog PR\n   - Always merge changelog PR before new changes\n   - Keep PRs focused and single-purpose\n   - Follow commit message conventions\n\nExample Flow:\n```bash\n# Start new feature\ngit checkout develop\ngit pull origin develop\ngit checkout -b feature/new-feature\n\n# Make changes and commit\ngit add .\ngit commit -m \"feat: add new feature\"\ngit push origin feature/new-feature\n\n# Create PR to develop and wait for merge\n# Create PR to main and wait for merge\n# Wait for changelog PR and merge it\n\n# Then start next feature\ngit checkout develop\ngit pull origin develop\ngit checkout -b feature/next-feature\n```\n\n#### Best Practices\n\n1. **Branch Naming**\n   - Features: `feature/descriptive-name`\n   - Fixes: `fix/issue-description`\n   - Docs: `docs/update-topic`\n\n2. **Commit Messages**\n   - Be descriptive but concise\n   - Follow conventional commits\n   - Reference issues when applicable\n\n3. **PR Guidelines**\n   - One feature/fix per PR\n   - Keep changes focused\n   - Update tests if needed\n   - Include documentation updates\n\n4. **Documentation**\n   - Update README for new features\n   - Keep code comments current\n   - Update API docs if changed\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\nIf you encounter any problems or have suggestions, please [open an issue](https://github.com/PeterVinter/Manage_linux_docker_containers/issues/new).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetervinter%2Fmanage_linux_docker_containers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetervinter%2Fmanage_linux_docker_containers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetervinter%2Fmanage_linux_docker_containers/lists"}