---
title: Migrate Your Docker App to Vercel
description: Move a Docker app to the Container Runtime on Vercel from AWS, Fly.io, Google Cloud Run, Railway, or Render with a migration guide for each provider.
url: "https://vercel.com/docs/functions/runtimes/container/migrate"
last_updated: 2018-10-20
related:
  - /docs/container-registry
  - /docs/functions/runtimes/container
  - /docs/daemons/migrate
  - /docs/schedules/cron-jobs
  - /docs/frameworks
install_vercel_plugin: npx plugins add vercel/vercel-plugin
search_with_vercel_cli: npx vercel@latest docs search "<query>"
search_kb_with_vercel_cli: npx vercel@latest kb search "<query>"
---

# Migrate Your Docker App to Vercel

To move a Docker app to Vercel, keep its `Dockerfile` at the project root, make its HTTP server listen on the port Vercel routes to, and deploy. Vercel builds the image, pushes it to [Vercel Container Registry](/docs/container-registry), and runs it as a Vercel Function on the [Container Runtime](/docs/functions/runtimes/container).

Your app fits the Container Runtime when it serves HTTP requests. Move background workers that keep running to [Daemons](/docs/daemons/migrate). Tasks that run on a schedule and exit become HTTP routes that [Cron Jobs](/docs/schedules/cron-jobs) call. If Vercel supports your [framework](/docs/frameworks), you can deploy from source without the `Dockerfile`.

## What changes when you migrate

During the Container Runtime beta, these behaviors apply whichever provider you migrate from:

- **Detected frameworks take precedence**: Vercel builds a root `Dockerfile` or `Containerfile` when it detects no other framework. If your project also matches a framework such as Next.js, [set the project framework to Container](/docs/functions/runtimes/container#dockerfile) or name the file `Dockerfile.vercel`.
- **Start commands come from the image**: Vercel runs the image's `ENTRYPOINT` and `CMD`. If your current provider sets a start command outside the image, move the command to the `Dockerfile`, or set a service's [`command`](/docs/services/config-reference#command), which replaces the image's `CMD` and keeps its `ENTRYPOINT`.
- **Traffic goes to port 80**: Your server must listen on port `80`. To keep another port, set the [`PORT` environment variable](/docs/functions/runtimes/container#port-resolution) in your project settings to that port.
- **Idle instances scale down**: Instances [scale down](/docs/functions/runtimes/container#scale-in-behavior) after 5 minutes without traffic in production and 30 seconds in preview. The container receives `SIGTERM` and has 30 seconds to clean up, so store sessions and unfinished work outside the instance.
- **Local files don't persist**: Files that your app writes belong to one instance and don't persist after that instance stops. Move files on a volume or disk to [Vercel Blob](/docs/vercel-blob), and move a database on a volume to a hosted database from the [Vercel Marketplace](/docs/marketplace-storage).
- **Private hostnames stay behind**: Your current provider's private hostnames don't resolve on Vercel by default, so use an endpoint that Vercel can reach for each database and service you keep. Use [Static IPs](/docs/networking/static-ips) on Pro and Enterprise when an endpoint requires an IP allowlist, and [Secure Compute](/docs/networking/secure-compute) on Enterprise when it requires a private connection.
- **Function limits and pricing apply**: Containers require [fluid compute](/docs/fluid-compute) with [Active CPU pricing](/docs/functions/usage-and-pricing#active-cpu) enabled, and have the same [limits](/docs/functions/limitations) as other Vercel Functions, such as a [4.5 MB request body](/docs/functions/limitations#request-body-size). Each image must stay within the [Container Registry limits](/docs/container-registry/limits-and-pricing).

## Migration guides by provider

Each guide maps the provider's configuration to Vercel, lists the features that need a different design, and walks through a cutover that keeps your current provider serving traffic until you've tested the Vercel deployment.

### AWS

An ECS task gets its AWS credentials from a task role, and private RDS and ElastiCache endpoints aren't reachable from the public internet. [Migrate self-hosted Next.js and containers from AWS to Vercel](/kb/guide/migrate-containers-from-aws-to-vercel) deploys Next.js from source and HTTP containers from their `Dockerfile`, sets up OpenID Connect (OIDC) federation so your code assumes an IAM role without stored access keys, and covers network paths to the AWS services you keep and a Route 53 cutover with rollback.

### Fly.io

Fly.io routes traffic to the `internal_port` in `fly.toml`, and Fly Volumes attach persistent storage to Machines. [Migrate from Fly.io to Vercel](/kb/guide/migrate-fly-io-to-vercel) moves `fly.toml` settings and secrets to `vercel.json` and environment variables, consolidates multiple apps into [Services](/docs/services), and covers alternatives for volumes and `release_command`.

### Google Cloud Run

Cloud Run injects a `PORT` variable that defaults to `8080`, and the service account attached to a service supplies its Google Cloud credentials. [Migrate from Google Cloud Run to Vercel](/kb/guide/migrate-cloud-run-to-vercel) moves Secret Manager secrets to environment variables, sets up Workload Identity Federation for the Google APIs you keep, and covers alternatives for Cloud Run jobs, worker pools, and sidecar containers.

### Railway

Railway services built with Railpack or Nixpacks have no `Dockerfile`, and `*.railway.internal` hostnames resolve only on Railway's private network. [Migrate from Railway to Vercel](/kb/guide/migrate-railway-to-vercel) walks through a framework deployment or a custom container for each service, maps `railway.json` settings, service variables, and cron schedules to Vercel, and covers alternatives for volumes, `preDeployCommand`, and health checks.

### Render

Render sets `PORT` to `10000` by default, and a web service on a native runtime has no `Dockerfile`. [Migrate from Render to Vercel](/kb/guide/migrate-render-to-vercel) translates the web services, private services, and cron jobs in `render.yaml` to `vercel.json`, moves data off persistent disks, and covers alternatives for pre-deploy commands and health check paths.

If your provider isn't listed, start with a [root `Dockerfile`](/docs/functions/runtimes/container#dockerfile), and use [Services](/docs/services) to deploy more than one container in a project.

## Search the docs from your terminal

Search the Vercel docs and read pages as Markdown with the Vercel CLI. No login required.

```bash
# Find docs pages by keyword
npx vercel@latest docs search "environment variables"
npx vercel@latest docs search "function timeout"

# Print a docs page as Markdown, by path or URL
npx vercel@latest docs inspect <page>
```

## Search guides from your terminal

Search the Knowledge Base and read guides as Markdown with the Vercel CLI. No login required.

```bash
# Find guides by keyword
npx vercel@latest kb search "rewrites and redirects"
npx vercel@latest kb search "AI SDK streaming"

# Show the latest guides
npx vercel@latest kb

# Print a guide as Markdown, by slug or URL
npx vercel@latest kb inspect <guide>
```

---

[View full sitemap](/docs/sitemap)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
