Websites and web tools
Running Docker for under $50: tips for small budgets
Containers do not need a big cloud bill. This page shows how a small automotive business, such as a shop with a booking app or a detailer with a gallery site, can run Docker on one modest machine and keep the monthly spend under a fixed cap of $50.
Start with the budget, not the tools
Write down every line that will cost money each month before you install anything. Typical lines are the server or virtual machine, storage for backups, the domain name (often billed yearly, so divide by 12), and any paid container registry. Prices change often and vary by provider, so check the provider's own pricing page and add a margin of about a fifth for surprises such as extra bandwidth.
| Line item | Billing | How to convert to monthly |
|---|---|---|
| Virtual server | Monthly or hourly | Hourly rate x 730 hours |
| Backup storage | Per GB per month | GB stored x rate |
| Domain name | Yearly | Yearly price / 12 |
| Registry or CI minutes | Usage based | Last month's usage x rate |
| Margin | Your choice | Add 20% of the total |
Keep images small
Image size affects disk space, pull time and how many packages you must patch. Three habits do most of the work:
- Use a slim or minimal base image for the language you run, and pin it to a version tag rather than
latest. - Use a multi-stage build: compile in a full image, then copy only the output into a small runtime image.
- Add a
.dockerignorefile sonode_modules,.git, test photos and local env files never enter the build context.
One server, one Compose file
A small business site rarely needs an orchestrator. A single virtual machine running Docker Compose can host the web app, a database and a reverse proxy that handles HTTPS. Keep the whole stack in one compose.yaml under version control so you can rebuild the server from scratch.
- Create a non-root user on the server and add it to the
dockergroup only if you accept that this group is root-equivalent. - Set
restart: unless-stoppedon each service so containers come back after a reboot. - Set memory limits per service so one runaway process cannot starve the database.
- Put database files on a named volume, never inside the container's writable layer.
- Run
docker system pruneon a schedule, with care, to clear old images and build cache.
Costs that sneak up
Unbounded logs
The default json-file logging driver can grow without limit. Set max-size and max-file options so container logs rotate instead of filling the disk.
Old images and volumes
Each deploy can leave the previous image behind. Over a few months this can fill a small disk and force you to buy a bigger plan. Check usage with docker system df once a month.
Backups you never test
A database dump copied to cheap object storage is inexpensive. Losing the customer booking table is not. Restore a backup to a scratch container at least once a quarter to prove it works.
When to spend more
Move beyond the cap when the server's CPU or memory sits near its limit during normal hours, when you need a second machine for uptime, or when a staff member spends more time patching than the extra spend would cost. Until then, a lean image and one well-kept server go a long way.