Comparisons

Cheapest Way to Run a Docker Container

10 places, priced for one small container that sits idle most of the day

Cheapest Way to Run a Docker Container
Published

The cheapest way to run a Docker container that sits idle most of the day costs nothing. On Light Cloud's Free plan your own Dockerfile runs unchanged, with no card and no cloud account, and a container serving 1,000 requests a day uses about a quarter of the $1 the plan includes. Google Cloud Run's free tier covers the same container at $0 too, once you set up a Google Cloud billing account. If you want to pay, Fly.io's 512 MB machine is $3.69 a month, Railway and DigitalOcean are $5, and AWS Fargate's smallest task is about $12.49 once it has a public address.

I build Light Cloud, so read the method before the ranking. Each price can be checked on the vendor's own page in a few minutes.

How we ranked

The container is small and mostly bored: up to 512 MB of memory, 1,000 requests a day, each taking 0.2 seconds of work. That is about 1.7 hours of actual work a month and 718 hours of waiting. It runs on the vendor's own address, with no custom domain and no database, because both change the price differently on every platform.

What decides the bill is what you pay for those 718 hours. Platforms that scale to zero charge little or nothing for them; platforms with fixed instances charge for every hour. I took the smallest tier that runs the container, which means at least 512 MB on platforms with fixed sizes, at list prices checked on 2026-10-13 and again on 2026-11-02, in US dollars, with no trial credits. Where a platform bills by usage, the price is the usage this container generates, not the plan's starting fee.

Four platforms come out at $0 (the same free plans, scored for APIs, are in free REST API hosting), so I broke ties in this order: the vendor allows the tier in production, it stays free without a card for good, and the Dockerfile runs unchanged.

Kept running all month, with no scale to zero, the same container gets the Always on prices in the table. Light Cloud comes last there, at about $52 a month for an always-on Micro, which needs the $19 Starter plan. Cloud Run keeps a minimum instance warm at its lower idle rate, Lambda sells provisioned concurrency, and Cloudflare lets a container stay up without promising it will.

The ranking

Cheapest first, for a container that is idle most of the dayPrices checked 13 Oct 2026
1
$0
A container that should cost nothing while idle, run from your own Dockerfile with no card and no cloud accountPrice: uses $0.24 of Free's $1
Card neededNoWhile it is idleScales to zero, costs $0
2
$0
The lowest rates and the biggest free allowance, for people who will set up a Google Cloud projectPrice: free tier, billing account
Card neededBilling accountWhile it is idleScales to zero, costs $0
3
$0
Containers that can be adapted to Lambda, for teams already on AWSPrice: free tier; image needs Lambda's client
Card neededNot for most new accountsWhile it is idleNothing runs, costs $0
4
$0
A demo container with no card, if a one-minute wake-up is acceptablePrice: free web service, not for production
Card neededNoWhile it is idleSleeps; about a minute to wake
5
~$3.69
The cheapest always-ready paid container, in the region of your choicePrice: 512 MB machine; requests all day keep it up
Card neededYes, after the trialWhile it is idleMachine can stop; disk still billed
6
$5
Paying for the memory a container actually uses, with $5 of it includedPrice: Hobby; ~$3 of usage fits in its $5
Card neededPaid planWhile it is idleSleep is opt-in
7
$5
A fixed $5 price that never changes, for a container you want warm all the timePrice: 512 MiB, always on
Card neededYesWhile it is idleBilled around the clock
8
$5-12
Containers that sit behind Workers you already run on CloudflarePrice: Workers Paid; basic instance asleep vs awake all day
Card neededWorkers PaidWhile it is idleSleeps after a timeout
9
~$12.49
Containers that must live inside an AWS network next to other AWS servicesPrice: smallest task + public IP
Card neededPaid planWhile it is idleBilled while the task runs
10
$29
Teams that want Koyeb's private network and basic auth, and need more than one containerPrice: Pro, required for new users
Card neededYes, with a $29 holdWhile it is idleScale to zero, in preview
Reference: one Docker container of up to 512 MB serving 1,000 requests a day at 0.2 s each, idle the rest of the time, on the vendor's address (no custom domain, no database). List prices from each vendor's own pricing and docs pages, checked 2026-10-13 and again on 2026-11-02 for Fly.io, Railway and Cloudflare, US dollars. Fixed-size platforms get their smallest size with at least 512 MB. Usage-billed platforms are priced on the usage this container generates, never on the plan's starting fee: on Railway about 250 MB of RAM held all month and 0.02 vCPU on average. Requests are spread through the day, so a machine that stops after a few idle minutes rarely gets the chance. Ties go to the tier the vendor allows in production, then to one that stays free without a card, then to one that runs the Dockerfile unchanged. The Always on view keeps one instance running all month with no scale to zero, at each platform's cheapest documented way to do that.

1. Light Cloud

Best for: a container that should cost nothing while idle, from your own Dockerfile, with no card.

The arithmetic: 1,000 requests a day at 0.2 s is about 1.7 instance-hours a month, $0.20 at the Micro rate of $0.12 an hour, plus two builds of two minutes at $0.01 a minute. That's $0.24 of the $1 the Free plan includes, with no card (pricing). Containers scale to zero by default, which is per-hour container billing that stops when idle rather than a monthly instance price.

A Dockerfile at the root of the repository always wins: Light Cloud builds and runs it exactly as written, and sets PORT in the container, 8080 by default. The Dockerfile tutorial covers the four things it needs, such as reading that port. No Dockerfile? It also detects Node, Python, Go, Java and .NET and writes one. Either way you build and deploy from your GitHub repository, and runtime logs are kept for 7 days.

The trade for $0 is the first request after a quiet spell: 3.1 to 3.7 seconds while a container starts. You can't keep it warm on Free; an always-on Micro is about $52 a month and needs Starter. Free has no custom domain and no database, and when the $1 is used up the container pauses until next month rather than billing you.

2. Google Cloud Run

Best for: the lowest rates and the biggest free allowance, if you'll set up a Google Cloud project.

Light Cloud's containers run on Cloud Run, so this is the engine without the wrapper. The free tier covers 180,000 vCPU-seconds, 360,000 GiB-seconds and 2 million requests a month (pricing); this container uses about 6,000 vCPU-seconds and 3,000 GiB-seconds. Past the free tier the rates are lower than ours. gcloud run deploy --source builds a Dockerfile as it is, or uses buildpacks if there isn't one.

You need a Google Cloud billing account to get the free tier, and usage beyond it is billed rather than paused, though spend caps that pause Cloud Run at a budget went generally available on 2026-10-12. Your own domain means a load balancer or Firebase Hosting, since the built-in mapping is a preview Google calls not production-ready.

3. AWS Lambda

Best for: containers that can be adapted to Lambda, for teams already on AWS.

Lambda's free tier is one million requests and 400,000 GB-seconds a month (pricing). At 512 MB this container uses about 3,000 GB-seconds and 30,000 requests, so $0, and a function URL gives it an HTTPS address. Most new AWS customers sign up without a payment method.

It ranks below Cloud Run because the Dockerfile has to change: a Lambda image must include a runtime interface client for your language. And AWS's Free plan closes the account after six months or when its credits run out, unless you upgrade to the Paid plan.

4. Render

Best for: a demo container with no card, if a one-minute wake-up is acceptable.

A free web service runs your Docker image unchanged, needs no card, and a workspace gets 750 free instance hours a month (free tier). If the price were the only rule, Render would tie for first.

It's fourth because Render says not to use free instances for production, and because of the wake-up. A free service spins down after 15 minutes without traffic and takes about a minute to come back. For a container that's idle most of the day, that means most first visits wait.

5. Fly.io

Best for: the cheapest always-ready paid container, in the region you choose.

A shared-cpu-1x machine with 512 MB, the size this container needs, is $3.69 for 30 days of continuous running; the 256 MB machine is $2.19 if your container fits in it (pricing). Machines can stop when idle, and a stopped machine pays only for its root filesystem at $0.15 per GB a month, but 1,000 requests spread through the day rarely leave a gap long enough to stop it, so expect close to $3.69. That's still the cheapest paid option here.

There's no free tier for new accounts, a card is required once the trial ends, and Fly says it doesn't support billing alerts yet.

6. Railway

Best for: paying for the memory a container actually uses, with $5 of it included.

Hobby is $5 a month and includes $5 of usage (plans). Railway has no fixed sizes; it bills RAM at $10 per GB a month and CPU at $20 per vCPU a month for what the container actually uses. A small container holding about 250 MB around the clock uses $2.50 of RAM, and about 0.02 vCPU on average adds $0.40, so about $3 of usage and a $5 bill, the same always on. Sleep is opt-in.

The Free plan's $1 of monthly credit covers about 100 MB of RAM held all month, before any CPU, so it is tight for most containers. Railway's docs don't say what happens when that credit runs out.

7. DigitalOcean App Platform

Best for: a fixed $5 that never changes, for a container you want warm all the time.

The smallest container is $5 a month for 512 MiB and a shared vCPU, limited to one instance (pricing). It runs around the clock, so there's no cold start and no surprise. Scale to zero exists only as a private preview you ask support for, and a sleeping service is still billed at 10%. You need a payment method to create anything.

8. Cloudflare Containers

Best for: containers that sit behind Workers you already run.

Containers are on the Workers Paid plan, $5 a month minimum, and bill memory and disk for the provisioned size and CPU only while it's active, in 10 ms steps (pricing). The smallest instance, lite, has 256 MiB, so a 512 MB container needs basic, with 1 GiB and a quarter of a vCPU. It sleeps after a timeout and charges stop; awake all month, basic adds about $6.93 of memory and disk above what's included. So $5 to about $12, and nearer $12 when requests arrive all through the day.

Requests reach the container through a Worker and a Durable Object, both billed as Workers usage, so your container sits behind code you write for Cloudflare. That's natural if you're already there and a detour if you aren't.

9. AWS Fargate

Best for: containers that must live inside an AWS network.

The smallest task, 0.25 vCPU with 0.5 GB, is about $8.89 for 30 days in us-east-1 (Fargate pricing), billed from image pull until the task stops. A public IPv4 address adds about $3.60, so about $12.49. ECS Express Mode will set up a load balancer with TLS for you, at about $16.20 a month more before usage charges.

10. Koyeb

Best for: teams that want Koyeb's private network and basic auth for more than one container.

Since February 2026, new users must pick a paid plan; Pro is $29 a month with $10 of compute included, and the card is checked with a $29 hold (pricing FAQ). Every plan includes one free web service with 512 MB that scales to zero after an hour without traffic, so this container costs nothing beyond the plan, though Koyeb says that free instance is not for production; a paid eco-micro instance with 512 MB at $2.68 a month (instances) fits inside the included $10. For one container, either way, it's the most expensive way in.

Where the others beat us

Once the container gets steady traffic, the order changes. Cloud Run's rates are lower than ours with or without its free tier. Fly's $3.69 machine and DigitalOcean's $5 container stay warm all month for less than our always-on price of about $52. If you need several regions, Fly has them; we have four. A database and a custom domain start on our Lite plan at $5; the Free plan has neither. And if your container is one of many inside AWS or Google Cloud, the native service keeps it next to everything else.

For one small container that waits most of the day, though, idle time is the whole bill, and on our Free plan idle time is free. If that's the cheapest way to run a Docker container you can find, a Dockerfile and a GitHub repository are all it takes.

What does your container do in the 718 hours a month nobody calls it?

More articles