mirror of
https://github.com/open-webui/terminals.git
synced 2026-11-05 01:37:21 +00:00
[PR #27] [MERGED] fix: best-effort max storage on docker backend #52
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/terminals#52
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/terminals/pull/27
Author: @james-westbrook
Created: 5/24/2026
Status: ✅ Merged
Merged: 6/22/2026
Merged by: @tjbck
Base:
main← Head:fix-docker-storage-limit📝 Commits (1)
c972bacfix: best-effort max storage on docker backend📊 Changes
2 files changed (+29 additions, -1 deletions)
View changed files
📝
README.md(+3 -0)📝
terminals/backends/docker.py(+26 -1)📄 Description
Description
The
dockerbackend silently ignored thestoragefield.provision()wired upimage,memory_limit,cpu_limit, andenv, but never readstorage— so per-policystorageandTERMINALS_MAX_STORAGEhad no effect on Docker (Kubernetes already sized PVCs correctly).This wires
storageinto the container via Docker'sStorageOpt, capping the writable layer. Because not every storage driver supports quotas (e.g. overlay2-on-ext4), provisioning falls back gracefully. If the daemon rejects the quota, it logs a warning and retries without it instead of failing.Caveat documented in the README:
StorageOptlimits only the container's writable layer, not the bind-mounted/home/userwhere user files persist (Docker can't quota a bind mount). For hard per-user storage caps, use a Kubernetes backend.terminals/backends/docker.py— applyStorageOptfromstorage, with retry-without-quota fallbackREADME.md— note on Docker storage-limit behavior and its limitsVerified end-to-end against a live Docker daemon: quota applied (
StorageOpt={'size': ...}confirmed via inspect), absent when unset, and fallback retries cleanly on rejection.Related Issues
Fixes #23
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.