[PR #57] [MERGED] Fix docker permission with docker group #68

Open
opened 2025-11-20 04:14:29 -05:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bigbeartechworld/big-bear-scripts/pull/57
Author: @dragonfire1119
Created: 11/12/2025
Status: Merged
Merged: 11/12/2025
Merged by: @dragonfire1119

Base: masterHead: fix-docker-permission-with-docker-group


📝 Commits (3)

  • 6638673 Add user to docker group and improve Docker service handling
  • a28239c Remove manual Docker directory permission fixes
  • dd3650f Update script version to 1.2.0 in run.sh

📊 Changes

1 file changed (+67 additions, -49 deletions)

View changed files

📝 casaos-fix-docker-api-version/run.sh (+67 -49)

📄 Description

This pull request updates the casaos-fix-docker-api-version/run.sh script to improve Docker permission handling, clarify cleanup steps, and streamline Docker directory management. The most significant changes introduce automatic user group configuration for Docker, simplify Docker runtime cleanup, and ensure Docker manages its own directory permissions on startup.

Docker permissions and user management:

  • Added a new add_user_to_docker_group function that automatically adds the current non-root user to the docker group if needed, providing clear instructions for the user to re-login or use newgrp for the permission change to take effect. This function is now called as part of the main workflow. [1] [2]

Docker runtime cleanup and permissions:

  • Refactored the clean_docker_state function to focus only on cleaning runtime state (such as sockets and pids), removing all manual Docker directory permission fixes and clarifying log messages. Now, Docker is relied upon to set its own directory permissions at startup. [1] [2]
  • Removed manual permission fixes for the overlay2 directory and other Docker directories from both the cleanup and downgrade steps, further delegating directory management to Docker itself. [1] [2]

Service management improvements:

  • Updated the Docker service restart logic to explicitly enable both the docker.socket and docker services before starting them, improving reliability after changes.

Other updates:

  • Incremented the script version number in the banner from 1.1.0 to 1.2.0.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bigbeartechworld/big-bear-scripts/pull/57 **Author:** [@dragonfire1119](https://github.com/dragonfire1119) **Created:** 11/12/2025 **Status:** ✅ Merged **Merged:** 11/12/2025 **Merged by:** [@dragonfire1119](https://github.com/dragonfire1119) **Base:** `master` ← **Head:** `fix-docker-permission-with-docker-group` --- ### 📝 Commits (3) - [`6638673`](https://github.com/bigbeartechworld/big-bear-scripts/commit/66386738419d52f74cd440711def7711d3da864c) Add user to docker group and improve Docker service handling - [`a28239c`](https://github.com/bigbeartechworld/big-bear-scripts/commit/a28239c4189605e58f2d877c0519400d68ab4582) Remove manual Docker directory permission fixes - [`dd3650f`](https://github.com/bigbeartechworld/big-bear-scripts/commit/dd3650ff0ca6f37123810923bfe80ed71f892a07) Update script version to 1.2.0 in run.sh ### 📊 Changes **1 file changed** (+67 additions, -49 deletions) <details> <summary>View changed files</summary> 📝 `casaos-fix-docker-api-version/run.sh` (+67 -49) </details> ### 📄 Description This pull request updates the `casaos-fix-docker-api-version/run.sh` script to improve Docker permission handling, clarify cleanup steps, and streamline Docker directory management. The most significant changes introduce automatic user group configuration for Docker, simplify Docker runtime cleanup, and ensure Docker manages its own directory permissions on startup. **Docker permissions and user management:** * Added a new `add_user_to_docker_group` function that automatically adds the current non-root user to the `docker` group if needed, providing clear instructions for the user to re-login or use `newgrp` for the permission change to take effect. This function is now called as part of the main workflow. [[1]](diffhunk://#diff-198701c5a479170ce972c97f3fc3fffdb839d314cdf1e68849f24463f63756aaR127-R173) [[2]](diffhunk://#diff-198701c5a479170ce972c97f3fc3fffdb839d314cdf1e68849f24463f63756aaR877-R881) **Docker runtime cleanup and permissions:** * Refactored the `clean_docker_state` function to focus only on cleaning runtime state (such as sockets and pids), removing all manual Docker directory permission fixes and clarifying log messages. Now, Docker is relied upon to set its own directory permissions at startup. [[1]](diffhunk://#diff-198701c5a479170ce972c97f3fc3fffdb839d314cdf1e68849f24463f63756aaL349-R398) [[2]](diffhunk://#diff-198701c5a479170ce972c97f3fc3fffdb839d314cdf1e68849f24463f63756aaL361-R431) * Removed manual permission fixes for the `overlay2` directory and other Docker directories from both the cleanup and downgrade steps, further delegating directory management to Docker itself. [[1]](diffhunk://#diff-198701c5a479170ce972c97f3fc3fffdb839d314cdf1e68849f24463f63756aaL549-L559) [[2]](diffhunk://#diff-198701c5a479170ce972c97f3fc3fffdb839d314cdf1e68849f24463f63756aaL725-R749) **Service management improvements:** * Updated the Docker service restart logic to explicitly enable both the `docker.socket` and `docker` services before starting them, improving reliability after changes. **Other updates:** * Incremented the script version number in the banner from 1.1.0 to 1.2.0. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2025-11-20 04:14:29 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/big-bear-scripts#68