Docker Hosting on AWS Fargate: Dockerfile, Image or Tarball

Managed Docker container hosting on AWS: push a GitHub repo with a Dockerfile, point at a public image, or upload a docker save tarball. SnapDeploy builds it, runs it in its own isolated container with HTTPS, logs and metrics, and keeps it alive.

Free tier: 4 containers, 100 hours a month, 10 deploys a day. No credit card. Always-On from $12 a month when it has to run 24/7.

Last verified 27 September 2026 against the live pricing page, the platform docs and the deployment code.

What Docker Hosting Is, and the Three Ways to Buy It

Docker hosting is somewhere to run a container image that is not your laptop. You hand over the image, or the Dockerfile that builds it, and the host supplies the machine, the network, a public URL and the restarts. What varies between one Docker hosting service and another is how much of the rest you still have to do yourself.

Searches for cloud Docker hosting land on three kinds of product. A VPS gives you a Linux box where you install Docker, a reverse proxy, certificates and monitoring. A Kubernetes or ECS cluster gives you orchestration, plus a cluster to operate. Managed container hosting gives you the result without either: an image goes in, an HTTPS URL comes out. SnapDeploy is the third kind.

  Managed container hosting (SnapDeploy) Docker on a VPS Kubernetes or ECS you run
You manageThe image and its environment variablesOS patches, Docker, proxy, TLS, monitoring, backupsCluster, nodes, manifests, ingress, upgrades
First deploy1 to 6 minutes from repo to HTTPS URLHours: provision, harden, install, configureA cluster comes before the first app; minutes per app after that
HTTPS and restartsIncluded: certificate, health check, restart on exitYour Caddy, nginx or Traefik and your systemd unitsIngress controller, cert-manager, liveness probes
Cost while idleFree tier costs nothing; Always-On is a flat fee per containerFull price for the boxFull price for the nodes
Best forOne to a handful of containers that should just runPeople who want root and enjoy operationsTeams with many services and a platform engineer

Three Ways to Host a Docker Container

Most Docker hosting services support one of these. SnapDeploy supports all three, and the same free tier and pricing apply to each.

📦

1. GitHub repo with a Dockerfile

Connect the repository once, public or private. If it contains a Dockerfile it is used exactly as written; if not, one is generated from the detected stack. The image is built on AWS CodeBuild (ARM64), pushed to a private registry and started on Fargate. A webhook redeploys on every push to the linked branch.

Typical build to live URL: 1 to 6 minutes depending on the stack. Builds time out after 60 minutes.

🐳

2. Public image by name (Docker image hosting, no build)

Type nginx:1.27, ghcr.io/you/app:v3 or any public image on Docker Hub, GitHub Container Registry, Quay or public Amazon ECR. No build stage. The listening port is read from the image; you can override it.

Public images run on x86-64 tasks. Private registries are not supported yet; use option 3 for a private image.

⬆️

3. Upload a docker save tarball

Build locally, run docker save -o app.tar app:tag, and upload the .tar, .tar.gz or .tgz (up to 2 GB). SnapDeploy loads it, pushes it to its private registry and deploys it. Nothing in your image leaves your control except the upload.

Uploaded images run on ARM64, so build them with docker build --platform linux/arm64. On Apple Silicon that is the default.

Deploy a Docker Container Step by Step

Container deployment on the GitHub path, because that is how most people use SnapDeploy for hosting Docker workloads. Docker-based hosting options with auto builds all need the same two things from your image: listen on the right port, and listen on all interfaces.

1.Make the app read PORT and bind 0.0.0.0

SnapDeploy sets a PORT environment variable in every container. Read it, and bind to every interface rather than localhost. A server that listens on 127.0.0.1 passes its own tests and fails every health check in the cloud.

// Node.js
app.listen(process.env.PORT || 3000, '0.0.0.0');

# Python (Flask, Gunicorn)
gunicorn --bind 0.0.0.0:$PORT app:app

If the app cannot read PORT, set the container port in the dashboard to whatever the app listens on. Either way works; the mismatch is what fails.

2.Write a small, multi-stage Dockerfile

A multi-stage build keeps compilers and dev dependencies out of the image that ships. Smaller images pull faster, so the container starts faster and wakes faster. This one is for a Node.js service that compiles to dist/; the shape is the same for Go, Python or Java.

# syntax=docker/dockerfile:1
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM node:20-alpine
WORKDIR /app
ENV NODE_ENV=production
COPY --from=build /app/package*.json ./
RUN npm ci --omit=dev
COPY --from=build /app/dist ./dist
EXPOSE 3000
CMD ["node", "dist/server.js"]

No Dockerfile? Skip this step. SnapDeploy detects Node.js, Python, Go, Ruby, PHP, Java and static sites and generates one. Commit your own when you need a system package, a specific base image or a custom start command.

3.Connect the repository and set the environment

Sign in, choose Deploy from GitHub, and pick the repository and branch. Add environment variables in the dashboard rather than in the image. Values whose names look like secrets are masked in the dashboard, PORT is reserved for the platform, and a build fails on purpose if a secret is placed under a public prefix such as NEXT_PUBLIC_, so it never ends up in browser JavaScript.

Everything here also works from an AI assistant: the MCP connector creates the container, sets variables and reads logs from Claude Code, Cursor, Codex or Gemini CLI.

4.Deploy and watch the build log

The build runs on AWS CodeBuild and streams to the dashboard line by line. When the image is pushed, a Fargate task starts and the platform polls the health check on your port: / for most apps, /actuator/health for Spring Boot. The URL goes live the moment the check passes.

Later deploys are zero-downtime: the new task starts beside the old one, the load balancer waits for its health check, then traffic moves and the old task stops. A build that never becomes healthy leaves the previous version serving.

5.Push to redeploy, or skip GitHub entirely

Every push to the linked branch rebuilds and redeploys. Prefer to build on your own machine, or need to ship a private image? Build for ARM64, save it and upload the tarball from the Docker Image Deployment screen:

docker build --platform linux/arm64 -t app:1.0 .
docker save -o app.tar app:1.0

For an off-the-shelf image such as a status page or a proxy, type the image name and tag instead. No build, no repository, live in one to two minutes.

Why First Deploys Fail, and the Fix for Each

From SnapDeploy's own build logs since July 2026, most common first. None of these is specific to SnapDeploy; they break on every container hosting platform.

  1. Dependency and Dockerfile errors. A pinned package that no longer exists, a lockfile out of step with package.json, or a base image with no ARM64 build. The build log names the line. For Python builds that fail on a broken requirements.txt, the dashboard offers Smart Fix: it shows the change, commits it to your repository and retries the build.
  2. Crashed at start. The image built, the process exited within seconds. Almost always a missing environment variable or a database URL that points at localhost. Read the container log tail; the stack trace is there.
  3. Health check never passed. The process is running but answers on a different port, or only on 127.0.0.1. Step 1 above prevents this.
  4. Wrong entry point or build output. The classic: a Vite project that emits dist/ while the start command serves build/, or a CMD that names a file the build never produced. Check the last COPY and the CMD against what the build actually wrote.

A failed deploy never touches a running container, and failed attempts count toward the daily deploy limit, so read the log before retrying. The troubleshooting guide has the exact log lines for each case.

What Every Container Gets

SnapDeploy is a container hosting platform, not a VPS: the platform owns the cluster, the proxy, the certificates and the restarts. Managed container hosting means you only own the image.

🧱

Its own AWS Fargate task

One container per task, never shared with other customers. Sizes: Small (512 MB, 0.25 vCPU), Medium (2 GB, 1 vCPU) and Large (4 GB, 2 vCPU). Change the size any time; Medium and Large run on an Always-On plan.

🔒

HTTPS, health checks, restarts

A *.containers.snapdeploy.app URL with a certificate on day one, a health check on your port, and automatic restarts when the process exits. Custom domains and WebSockets come with Always-On.

📊

Logs, metrics, environment

Build logs stream live, runtime logs and CPU/memory metrics are in the dashboard, and environment variables and secrets are set per container without rebuilding the image.

🗄️

Managed databases beside it

PostgreSQL, MySQL, MariaDB, MongoDB, Redis and RabbitMQ as add-ons, wired into the container's environment. Try any of them for $1 for 12 hours before subscribing.

🤖

Deploy from your AI assistant

The MCP connector lets Claude Code, Cursor, Codex or Gemini CLI deploy, read logs and set variables from the chat. Scoped tokens, and no token can delete anything.

⚡

GPU when you need it

Dedicated Tesla T4 ($499 a month) and A10G ($999 a month) instances for inference and training, with the same Dockerfile workflow and one-click PyTorch, Hugging Face and vLLM templates.

Docker Hosting Pricing

Flat prices per container, no usage metering, no bandwidth bill; fair-use traffic limits apply. The Docker hosting free tier is the first row; everything below it is a flat price. Cheap Docker hosting should be cheap to predict as well as cheap to buy.

Plan Price Size Runs 24/7 Good for
Free$0, no credit cardSmall: 512 MB, 0.25 vCPU; up to 4 containersNo: sleeps after 15 min idle, 100 h/month, 10 deploys/dayFree container hosting for side projects, demos and learning Docker
Sprint Pack$1 one-timeOne Small containerYes, for 24 hours; unlimited deploysA launch day, a demo, a hackathon
Always-On Small$12/month; $9.96/month annual512 MB, 0.25 vCPUYesAPIs, bots, webhooks, small web apps
Always-On Medium$25/month; $20.75/month annual2 GB, 1 vCPUYesNext.js, Django, Rails, Spring Boot
Always-On Large$45/month; $37.35/month annual4 GB, 2 vCPUYesJVM apps, heavy builds, small ML services
GPU T4 / A10G$499 / $999 per monthDedicated GPU, 16 GB / 24 GB VRAMYesInference, fine-tuning, LLM serving

Limits You Should Know Before You Deploy

Free Docker container hosting comes with rules. The best Docker hosting for a project depends on these as much as on price, and most comparisons skip them. Here they are; the complete list is in the free-tier documentation.

  • Free containers sleep. After 15 minutes without traffic a free container stops and wakes in about 60 seconds when someone opens it in a browser. A script, cron job or CI runner does not wake it. Anything that must always be up belongs on Always-On.
  • Free hours and deploys are capped. 100 running hours a month across your containers and 10 deploys a day (5 per rolling 12 hours). A one-time $1 Sprint Pack lifts both for 24 hours on one container.
  • One container per deploy. No Docker Compose yet. Databases, caches and queues are add-ons rather than sidecar services.
  • No private registries yet. Public images by name, or a tarball upload for anything private.
  • Linux images only, and mind the architecture. Built and uploaded images run on ARM64; public images by name run on x86-64.
  • No persistent disk. The filesystem is ephemeral and there are no mountable volumes. State goes in a database add-on or object storage.
  • One task per container. Resize between Small, Medium and Large at will, but there is no horizontal autoscaling that adds replicas under load.
  • Custom domains and WebSockets need Always-On. A domain pointing at a sleeping container would show errors, and the free edge does not hold a WebSocket open.

What People Host in Docker Containers Here

One rule covers all of them: the container must answer HTTP on its port, because that is how the health check knows it is alive.

REST and GraphQL APIs

Express, FastAPI, Flask, Gin, Spring Boot. The biggest group. Free while you build it, Always-On Small once a mobile app or a front end depends on it.

Full-stack web apps

Next.js, Django, Rails, Laravel, Nuxt. Medium is the usual size once server rendering and a database client share the process.

Webhook receivers and integrations

Stripe, GitHub and Slack call your endpoint when they feel like it, not when a browser is open. These belong on Always-On so the call never meets a sleeping container.

Microservices, one per container

Each service gets its own container, URL, size and log stream. Lists of top platforms to host Docker microservices tend to assume Compose; here the services talk over HTTPS instead.

Internal tools and dashboards

Admin panels, Streamlit and Gradio apps, Metabase-style reporting. Free-tier sleep is fine here: the first visitor of the day waits a minute, everyone after them does not.

Staging copies and previews

A second container linked to a staging branch. It sleeps when nobody is reviewing and costs nothing while it does.

Workers and scheduled jobs

Run them on Always-On and give the process a tiny HTTP endpoint for the health check. A worker that never opens a port fails the health check and the deploy is marked failed.

ML inference and AI APIs

Small models on a CPU container; anything with a GPU dependency on a dedicated T4 or A10G with the same Dockerfile workflow.

Off-the-shelf images

A status page, an uptime monitor, a documentation site or a reverse proxy pulled from Docker Hub by name. No repository, no build.

Security and Isolation

What a container hosting platform does for you that a shared VPS does not.

  • One task, one customer. Every container runs as its own AWS Fargate task with its own CPU and memory allocation. There is no shared Docker daemon and no neighbour on the same host that you, or they, can see.
  • Private registry for built images. Images built from your repository or loaded from a tarball go to a private Amazon ECR repository. They are never published.
  • TLS everywhere. Every container URL has a certificate from the first deploy, and custom domains get one automatically on Always-On.
  • Secrets stay out of the image. Environment variables live in the platform, not in the Dockerfile. Secret-named values are masked in the dashboard, and a secret under a public prefix fails the build rather than shipping to the browser.
  • Assistant tokens that cannot delete. MCP tokens are scoped to what an assistant needs: deploy, read logs, set variables. No MCP token can delete a container, so a confused agent cannot take production down.
  • GitHub access you can revoke. The GitHub connection uses the standard repo scope to list and clone your repositories and installs one webhook on each linked repository. Unlink a repository and the webhook is removed; revoke the authorisation from GitHub at any time.

How It Compares With Other Docker Hosting Services

Searches for cheap Docker hosting or docker cloud hosting, and lists of the best platforms for hosting Docker containers, usually land on one of these five. Checked against each vendor's own pricing and docs pages on 26 September 2026. The full docker container hosting free tier comparison covers seven platforms in detail.

Host Free tier for a Docker container Cheapest 24/7 container Credit card at sign-up Dockerfile builds
SnapDeploy4 containers, 100 h/month, 10 deploys/day; sleeps after 15 min idle$12/month (512 MB, 0.25 vCPU); $1 for 24 hNoYes, plus public images and tarballs
Render750 h/month, 512 MB, 0.1 CPU; spins down after 15 min, about a minute to wake$7/month Starter (512 MB, 0.5 CPU)NoYes
Railway$5 trial for 30 days, then $1 of credit a month$5/month Hobby plus usageNo (paid plans need a card)Yes
Fly.ioTrial: 2 machine-hours or 7 days, then apps stopAbout $1.94/month (256 MB shared)Yes, to keep anything runningYes
Koyeb1 service, 512 MB, 0.1 vCPU; scales to zero after 1 h idleAbout $1.61/month (256 MB)Yes, $29 pre-authorisation holdYes

On raw monthly price, Koyeb and Fly.io are the cheapest Docker host in this table for a 24/7 container, and both need a card before anything runs. SnapDeploy's free tier is the only one here with no card, no trial expiry and a $1 path to 24 hours of Always-On. Sources: render.com/pricing and render.com/docs/free, railway.com/pricing, fly.io/pricing, koyeb.com/pricing.

Isolation: every SnapDeploy container, free tier included, runs as its own AWS Fargate task with a reserved 0.25 vCPU and 512 MB; AWS runs each task on a single-use, single-tenant compute instance. Fly.io and Koyeb also give each app its own VM or microVM; Render's free instance is 0.1 CPU and Railway's trial runs on shared vCPU cores (its own wording). Details in the Security and Isolation section below. Sources: aws.amazon.com/fargate/faqs, docs.fly.io/machines, koyeb.com/docs/reference/instances, docs.railway.com/pricing/free-trial, render.com/docs/compute-plans.

Moving From Render, Railway, Fly.io or Heroku

A Dockerfile is portable by design, which is the whole point of choosing Docker hosting over a platform-specific build. Connect the same repository, re-enter the environment variables, deploy, and point the domain at the new container once the health check is green. Most moves take one afternoon, and the old host keeps serving until you switch DNS.

Two things change on the way in. Apps that relied on a buildpack or a Heroku Procfile get a Dockerfile generated from the detected stack, or you commit your own. Anything that wrote to local disk needs a database add-on or object storage instead, because the filesystem here is ephemeral.

If It Runs in a Linux Container, It Runs Here

Any language, any framework. Without a Dockerfile these stacks are detected and get one generated.

Node.js
Python
Go
Ruby
PHP
Java
Static sites
Anything with a Dockerfile

Docker Container Hosting Questions, Answered

What is Docker hosting?

Docker hosting is a service that runs your application as a Docker container on someone else's infrastructure. You supply an image or a Dockerfile; the host provides the machine, the network, HTTPS, restarts and logs. Managed Docker hosting such as SnapDeploy also removes the cluster: there is no server to patch and no Kubernetes to operate.

Is there free Docker hosting?

Yes. SnapDeploy's free tier runs up to 4 Docker containers with 100 running hours a month and 10 deploys a day, with no credit card. Free containers sleep after 15 minutes without traffic and wake in about 60 seconds when someone opens them in a browser. For a container that must run 24/7, Always-On starts at $12 a month.

Docker hosting vs a VPS: which should I choose?

Choose a VPS when you want root access and are happy to install Docker, a reverse proxy, certificates and monitoring yourself, and to patch the box. Choose managed Docker hosting when you want to hand over an image and get a URL. On a VPS you pay for the whole machine even when it idles; on SnapDeploy a free container costs nothing and an Always-On one is a flat monthly fee.

Do I need Kubernetes to host Docker containers?

No. Kubernetes is for teams running many services across many machines. For one to a handful of containers, a managed container hosting platform gives you the parts you would build on Kubernetes anyway: isolation, health checks, restarts, HTTPS and rolling deploys, without the cluster to operate.

What is the cheapest way of hosting Docker containers 24/7?

On SnapDeploy, Always-On Small is $12 a month per container (512 MB RAM, 0.25 vCPU), $9.96 a month on the annual plan, and a one-time $1 Sprint Pack keeps a container awake for 24 hours. Among the hosts we checked in September 2026, Koyeb's smallest paid instance is about $1.61 a month and Fly.io's about $1.94, both needing a credit card on file; Railway's Hobby plan is $5 a month plus usage; Render's Starter is $7.

Can I host a Docker container without a credit card?

Yes. Sign-up needs an email or a GitHub account only, so this is free Docker hosting without credit card details. A payment method is required only when you buy Always-On, a Sprint Pack, a database add-on or GPU time.

Can I deploy from a private GitHub repository?

Yes. Connect GitHub once and pick any repository you have access to, public or private. A webhook redeploys the container on every push to the linked branch. Other branches are ignored, so a push to a feature branch does not touch production.

Do you support Docker Compose?

Not yet. Each deploy runs one container. Databases, caches and queues that a compose file would define as extra services are available as managed add-ons: PostgreSQL, MySQL, MariaDB, MongoDB, Redis and RabbitMQ, each with a $1 12-hour trial.

Can I deploy an image from a private registry?

Not directly yet. Public images from Docker Hub, GitHub Container Registry, Quay and public Amazon ECR work by name. For a private image, run docker save and upload the tarball; SnapDeploy pushes it to its own private registry and deploys it.

Which CPU architecture do containers run on?

Images built from your repository or uploaded as a tarball run on ARM64 (AWS Graviton) Fargate tasks, so a Dockerfile must build for linux/arm64; most official base images are multi-architecture and just work. Public images pulled by name run on x86-64.

Does data written inside the container persist?

No. The container's filesystem is ephemeral: anything written to it is gone after a redeploy, a restart or a wake from sleep. Keep state in a managed database add-on or in object storage such as S3, and treat the container as replaceable.

Can a container scale automatically?

Vertically, yes: move a container between Small, Medium and Large at any time. Horizontally, no: each container is one task, and there is no autoscaling that adds copies under load. If you are searching for the cheapest Docker hosting with autoscaling across many replicas, SnapDeploy is not that today.

Does a cron job or CI runner wake a sleeping free container?

No. A sleeping free container is woken by a browser visit. Scheduled jobs, webhooks and server-to-server calls that must always find the app running belong on an Always-On container, which never sleeps.

Can I move a Docker app from Render, Railway, Fly.io or Heroku?

Yes. A Dockerfile moves as it is: connect the same repository, re-enter the environment variables and deploy. Apps that relied on a buildpack or a Procfile get a Dockerfile generated from the detected stack. The migration guides for each platform are linked at the end of this page.

Proud Member Of

As Seen On

Host Your Docker Container Today

Deploy free. 10 deploys a day, 100 hours a month, no credit card. Always-On from $12 a month when it has to stay up.

Deploy Free Today
FIRST OF ITS KIND

Sprint Pack — $1 for 24 hours

The first managed container PaaS to offer a one-time 24-hour Always-On pass under $5. Unlimited deploys + Always-On for one Small (512 MB) container — including WebSockets & real-time apps. No subscription, no auto-renewal. Stack two for 48 hours.

Need a managed database too? DB Sprint Pack — $1 / 12h for Postgres, MySQL, MariaDB, Mongo, Redis, or RabbitMQ.