mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
fix(docker): drop startup /app re-chown to keep cold starts fast
This commit is contained in:
1 parent
4f0da40169
commit
dde09ac85b
5 files changed
+29
-57
No files matched your search
@@ -97,9 +97,4 @@ warn_if_workspace_owner_differs /workspace "$OCM_TARGET_UID" "$OCM_TARGET_GID"
|
||||
mkdir -p /app/data /workspace /home/node/.cache /home/node/.opencode
|
||||
chown -R node:node /app/data /workspace /home/node
|
||||
|
||||
if [ "$OCM_UID_CHANGED" = "1" ] || [ "$OCM_GID_CHANGED" = "1" ]; then
|
||||
echo "Realigning /app ownership after id change"
|
||||
chown -R node:node /app
|
||||
fi
|
||||
|
||||
exec runuser -u node -- "$@"
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
OCM_TARGET_UID=""
|
||||
OCM_TARGET_GID=""
|
||||
OCM_UID_CHANGED=0
|
||||
OCM_GID_CHANGED=0
|
||||
|
||||
resolve_target_ids() {
|
||||
OCM_TARGET_UID="${PUID:-1000}"
|
||||
@@ -49,7 +47,6 @@ align_group_id() {
|
||||
|
||||
echo "Aligning $account group to gid $target_gid"
|
||||
groupmod -g "$target_gid" "$account" || return 1
|
||||
OCM_GID_CHANGED=1
|
||||
}
|
||||
|
||||
align_user_id() {
|
||||
@@ -69,7 +66,6 @@ align_user_id() {
|
||||
|
||||
echo "Aligning $account user to uid $target_uid"
|
||||
usermod -u "$target_uid" "$account" || return 1
|
||||
OCM_UID_CHANGED=1
|
||||
}
|
||||
|
||||
align_container_user() {
|
||||
|
||||
Reference in new issue
Block a user