DEV Community

Cover image for How to Deploy Your App with Docker on Render in 5 Minutes
Zed
Zed

Posted on

How to Deploy Your App with Docker on Render in 5 Minutes

If you’ve built a full stack app and want a super easy way to get it online, Render + Docker is a winning combo. In this quick guide, I’ll show you how I deployed my app using a Dockerfile on Render.com — with zero server config!

Prerequisites

  • A working app (Node.js, Python, etc.)
  • A Dockerfile in your project root
  • A GitHub repository
  • A free account on Render

Step 1: Create a Dockerfile

Here’s an example Dockerfile for a Node.js app:

# Use official Node image
FROM node:18

# Set working directory
WORKDIR /app

# Copy all files
COPY . .

# Install dependencies
RUN npm install

# Start the app
CMD ["npm", "start"]

# Expose port
EXPOSE 3000
Enter fullscreen mode Exit fullscreen mode

For Python Flask, you might use:

FROM python:3.11
WORKDIR /app
COPY . .
RUN pip install -r requirements.txt
CMD ["python", "app.py"]
EXPOSE 5000
Enter fullscreen mode Exit fullscreen mode

Make sure to customize the Dockerfile for your tech stack.


Step 2: Push Your Code to GitHub

If you haven’t already:

git init
git add .
git commit -m "initial commit"
git remote add origin <your-repo-url>
git push -u origin main
Enter fullscreen mode Exit fullscreen mode

Step 3: Create a Web Service on Render

  1. Go to https://render.com
  2. Click New + → Web Service
  3. Connect your GitHub repo
  4. Render will auto-detect your Dockerfile
  5. Set the following:
    • Name: Anything you like
    • Environment: Docker
    • Build Command: Leave empty
    • Start Command: Use from Dockerfile
    • Port: 3000 (or 5000 for Flask)
  6. Click Create Web Service

Render will start building your image and deploy it automatically.


Pro Tips

  • Use .env file locally and set the same Environment Variables in Render
  • Add a render.yaml file for Infrastructure as Code (optional)
  • Set up automatic deploys on every GitHub push
  • Monitor logs directly in the Render dashboard

Conclusion

Docker + Render makes it dead simple to go from local development to live deployment. No AWS console, no NGINX config — just push and deploy.

If you found this helpful, leave a like, share with your dev friends, or drop questions in the comments!

Top comments (0)