Docker on Render
Docker is the preferred application delivery mechanism for an increasing number of applications. Render offers native support for running containerized apps and services at scale, offering features previously only available in complex orchestration tools like Kubernetes but without the associated management complexity and steep learning curve.
Render’s Docker support includes:
- Automated builds and deploys for Dockerfiles in both public and private Git repositories.
- Parallelized multi-stage builds.
- Customizable Docker
CMD, context directory and Dockerfile path.
- Automatic translation of environment variables to Docker build args.
- Maximal layer caching for faster builds.
- Infrastructure as Code with
All Docker services come with standard Render features like:
- Private networking, load balancing, and service discovery.
- Persistent block storage.
- Automatic Brotli and gzip compression for faster responses.
- Easy HTTP health checks and zero downtime deploys.
- Automatic Pull Request Previews.
- Native HTTP/2 support.
- Automatic HTTP → HTTPS redirects.
- Unlimited custom domains.
- Free and unlimited teams and collaborators.
Render has native support for most popular languages including Node, Python, Elixir, Rust, Go and Ruby. You don’t need to learn Docker or create Dockerfiles if your app can be deployed with a native environment and a build and start command.
You should consider containerizing your application in the following scenarios:
- You need OS-level packages not included in a native environment. With Docker you have complete control over your base operating system and installed packages.
- Your application is in a language not yet supported natively on Render, like PHP, Java, or ASP.NET.
- You need guaranteed reproducible builds. We release regular updates to native environments to improve functionality, security, and performance. While we aim for full backward compatibility, using a Dockerfile is the best way to ensure that your production runtime is always in sync with your local builds.
Render uses the new BuildKit engine to build your Dockerfiles. BuildKit includes several improvements to build performance and image management.
Render caches all intermediate layers in your Dockerfile, making subsequent builds significantly faster. Follow these instructions from Docker to further optimize your images and improve build times.
Render builds your Docker image on every push to your repo, storing the image in a private and secure container registry. After building the image, the system creates new containers based on the latest version of your app and starts directing traffic to them as soon as they are healthy. See zero downtime deploys for more details.
You can build and deploy your own Dockerfile by simply adding it to your repo and following the regular service creation flow. Render automatically detects Dockerfiles at the root of your repo and suggests a Docker environment for your app during this flow.
We also have templates to install popular open-source applications on Render using Docker: