Docker > Volumes: sorting by Size does nothing, and text columns sort inconsistently
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 79/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- docker, typescript
- Domain
- devops
Research direction
Read apps/dokploy/components/dashboard/docker/volumes/show-volumes.tsx and compare its Size column with the Images table’s Size column. Set a numeric accessor for the parsed volume size and use a consistent alphanumeric sorting function for the text columns. Done means Size sorts correctly in both directions and text column order stays consistent with 7 or 16 rows and while searching; the issue reports these checks in a local dev instance.
Written by the indexing model from the issue text.
Description
To Reproduce
- Open Docker → Volumes on a server with a few volumes of different sizes. Names like
app2_data,app9_data,app10_dataand one starting with an uppercase letter (Zeta_cache) make the problem easy to see. - Wait for the Size column to finish loading.
- Click the Size header, then click it again.
- Look at the Name order. With 10 or fewer volumes, look at the default order. With more than 10, type into the search box until 10 or fewer are left (for example
app) and compare.
Current vs. Expected behavior
Current (reproduced on a local dev instance of canary @ dbf8034, with 7 and with 16 volumes)
- Clicking Size doesn't sort by size in either direction. The rows stay in the order
docker volume lsprints them (by name), and the second click shows the same order as the first. - Name, Driver, Scope and Mountpoint compare values differently depending on how many rows the table holds:
- 10 rows or fewer: plain string comparison.
Zeta_cachecomes beforealpha_logs, and the order isapp10_data,app2_data,app9_data. - More than 10 rows: case-insensitive and number-aware, so
alpha_logs,app2_data,app9_data,app10_data, …,Zeta_cache. - So the order changes while you type: with 16 volumes, Name shows
app2_data,app9_data,app10_data, and searching forappturns that intoapp10_data,app2_data,app9_data.
- 10 rows or fewer: plain string comparison.
Expected
Size sorts by the actual size, and text columns always sort the same way, however many rows there are.
Cause (apps/dokploy/components/dashboard/docker/volumes/show-volumes.tsx, TanStack Table 8.21.3)
- The Size column has an
idand asortingFnbut noaccessorFn. TanStack'scolumn.getCanSort()requires anaccessorFn, andgetSortedRowModeldrops sort entries whose column can't sort, so the Size sort is silently ignored. - The text columns use the default
"auto"sorting function. TanStack picks it by samplinggetFilteredRowModel().flatRows.slice(10), which is rows 11 onwards. With 10 or fewer rows nothing is sampled and it falls back tobasic; otherwise it picksalphanumeric(ortextif the sampled values contain no digits). The search box filters the data before it reaches the table, so the row count, and with it the sorting function, changes as you type.
Proposed fix
- Size: do what the Images table already does (show-images.tsx#L262-L263):
accessorFn: (row) => parseSize(sizeByName.get(row.Name) ?? undefined). Keep the cell showing the human-readable size and drop the customsortingFn. - Name, Driver, Scope, Mountpoint: set
sortingFn: "alphanumeric". That's the order users already get with more than 10 volumes, and it keepsapp2_databeforeapp10_data."text"would also be consistent, but it compares character by character, soapp10_datawould stay beforeapp2_data.
I've tested this change (5 lines added, 3 removed) in a local dev instance. Size now sorts correctly in both directions, and Name gives the same order with 7 rows, 16 rows and while searching.
Screenshots (current behaviour, local dev instance: 7 volumes in the default Name order, the same 7 after clicking Size, and 16 volumes while searching for app):
Provide environment information
Operating System:
OS: Ubuntu 26.04 (WSL2)
Arch: x86_64
Dokploy version: v0.31.8 (canary @ dbf8034, local dev instance)
VPS Provider: none, local machine
What applications/services are you tying to deploy?
Not service-specific: this is the Docker > Volumes page.
Which area(s) are affected? (Select all that apply)
Docker
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
- The Images and Disk Usage tables already give their Size column an
accessorFn, so only the Volumes table has the first problem. - The
"auto"sampling quirk also affects text columns in other tables (for example Images → Repository/Tag). I'd keep this fix to the Volumes table unless you want the others changed in the same PR. - The sort headers always show the same ↕ icon, so you can't tell which column is sorted or in which direction. I've left that out of the fix.
- Related: #6192 (a volumes view on the compose page, which would reuse this table's sorting).
Will you send a PR to fix it?
Yes
- Dominant language
- TypeScript
- Stars
- 38.8k
- Forks
- 3.2k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 117
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Dokploy/dokploy
-
needs-triage🔍
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Dokploy/dokploy#6197 · 1 comment ·
Maintainers usually reply within 1 day
-
Healthy Swarm task shows an empty `(Error:)` suffix on the last row of the Containers tabPossibly taken @AyhamJo7 claimed this 7 days ago. Openneeds-triage🔍
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Dokploy/dokploy#6115 · 1 comment ·
Maintainers usually reply within 1 day
-
MongoDB with Replica Sets enabled: container exits with code 0 and restarts in a loop (generated startup script never waits on mongod)Possibly taken @ghazy2001 claimed this 13 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Dokploy/dokploy#6051 · 2 comments ·
Maintainers usually reply within 1 day
-
Dokploy monitoring API returns partial container metrics with HTTP 200 when a row read failsPossibly taken @PAtreju claimed this 15 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Dokploy/dokploy#6029 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Volume backup silently uploads an empty tar when the volume does not exist on the host (stack prefix missing / service on swarm worker)Possibly taken @PAtreju claimed this 15 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Dokploy/dokploy#6022 · 1 comment · 1 reaction · 1 assignee ·
Maintainers usually reply within 1 day
Similar issues
-
🔨 tool 🧰 library
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Orange-OpenSource/Orange-Boosted-Bootstrap#4035 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
DISIC/teleservice-conformite#230 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
rothgar/rabble.radio#410 ·
Maintainers usually reply within 1 day
-
area/webapp comp/desktop P2 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#163341 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
smart-village-solutions/smart-speech-flow#765 ·
Maintainers usually reply within 1 day