Database backups require gzip/shell inside the DB container, breaking hardened images (e.g. Docker Hardened Images)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- docker, mariadb, mysql, postgresql
- Domain
- databases, devops, infrastructure
Research direction
Trace the current Postgres, MySQL, and MariaDB backup and restore entry points, focusing on the docker exec bash -c commands described in the issue. Compare the backup and restore flows and verify them with a hardened image lacking gzip and a shell. Done means dumps and restores work with host-side compression and direct dump-binary execution without weakening the database image.
Written by the indexing model from the issue text.
Description
What problem will this feature address?
Postgres/MySQL/MariaDB backups execute <dump> | gzip inside the database container via docker exec ... bash -c. Hardened/minimal images (DHI, distroless, Chainguard) intentionally ship without gzip, a package manager, or sometimes a shell, so backups fail. The only workarounds if you want to leverage the built-in backup feature are to add gzip to the image or install it at container start, both of which weaken the hardening.
Describe the solution you'd like
- Run only the dump binary in the container and do compression on the Dokploy host:
docker exec -e PGPASSWORD=... <c> pg_dump -Fc ... | gzip | rclone rcat ....The output format doesn't change, so it's backward compatible. - Exec the dump binary directly (argv form), not via
bash -c. - Optional: a compression setting (gzip / none / native
pg_dump --compress), since-Fcis already compressed. - Mirror this in restore: decompress on the host and stream to
docker exec -i <c> pg_restore ....
Describe alternatives you've considered
Tested workaround on 18-debian-dev which includes apt-get. Used the Command/Args to have gzip installed at startup via base -c apt-get update && apt-get install -y gzip && exec docker-entrypoint.sh
This works but again, defeats the purpose of using a hardened image by needing to use the -dev with more CVEs and also installing gzip on each redeploy. Many reason why gzip is not included in even the -dev version of this secure container.
Additional context
Tested on Dokploy v0.30.6 with dhi.io/postgres:18-debian image
Will you send a PR to implement it?
Maybe, need help
- Dominant language
- TypeScript
- Stars
- 38.2k
- Forks
- 3.1k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 65
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 62/100
Dokploy/dokploy#5836 · 1 comment ·
Maintainers usually reply within 1 day
-
Server threshold (CPU/Memory) alerts for the main Dokploy server never reach any notificationPossibly taken @ghazy2001 claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Dokploy/dokploy#5830 · 1 comment ·
Maintainers usually reply within 1 day
-
Add a "System" option to the dark/light mode setting (follow OS appearance)Possibly taken @fabianfrankwerner claimed this 23 days ago. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Dokploy/dokploy#5638 · 1 comment ·
Maintainers usually reply within 1 day
-
compose.search omits services missing from member accessedServices, even for owners/adminsPossibly taken @imrja8 claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Dokploy/dokploy#5361 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
[Feature Request] Show usage example for File Mounts created in the UIPossibly taken @jereok91 claimed this 46 days ago. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Dokploy/dokploy#5147 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
kunchenguid/gh-axi#247 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lidge-jun/opencodex#8101 · 2 comments ·
Maintainers usually reply within 1 day
-
effort:S P3 refactor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nightscout/nocturne#3243 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
JuliusBrussee/caveman#1449 ·
Maintainers usually reply within 1 day