Sign inSign up

edalca/frappe

By edalca

Updated about 2 months ago

Secure Frappe Framework runtime. Optimized for multi-stage builds and non-root execution

Image
Languages & frameworks
1

3.2K

edalca/frappe repository overview

🚀 Frappe Framework Runtime

An optimized Docker image for Frappe Framework and ERPNext, designed for security, performance, and ease of use in both development and production environments.

This image utilizes a Multi-Stage build approach to minimize image size and runs strictly as a non-privileged user (frappe) for enhanced container security.

✨ Key Features

  • 🔒 Secure (Non-Root): Runs strictly as the frappe user, adhering to container security best practices.
  • ⚡ Multi-Stage Build: Provides a clean final image without unnecessary build tools (while retaining essential libraries for pip install in development).
  • 📦 Batteries Included:
    • Python: 3.14 (v16) / 3.11 (v15)
    • Node.js: v24 (v16) / v20 LTS (v15) + yarn
    • Tools: wkhtmltopdf (QT patched), mariadb-client, postgresql-client, redis-tools, nginx.
  • 🛠️ Smart Entrypoints: Custom scripts (dev-entrypoint.sh, nginx-entrypoint.sh) that automatically configure DB/Redis connections and generate common_site_config.json at startup.
  • 🔄 Multi-Version Support: Tags available for Frappe v15 (Stable) and v16 (Develop/Edge).

🏷️ Supported Tags

TagFrappe VersionPythonNode.jsStatus
16, latestv16 (Develop)3.14v24Edge / Experimental
15v15 (Stable)3.11v20Stable / Production

🚀 Quick Start (Docker Compose)

Create a docker-compose.yml file:

services:
  # Database
  db:
    image: mariadb:10.6
    environment:
      MARIADB_ROOT_PASSWORD: admin
    volumes:
      - db-data:/var/lib/mysql

  # Cache & Queues
  redis:
    image: redis:6.2-alpine

  # Frappe Web
  web:
    image: edalca/frappe:16  # Or use :15
    entrypoint: ["/usr/local/bin/dev-entrypoint.sh"]
    command: ["bench", "serve", "--port", "8000"]
    environment:
      - DB_HOST=db
      - DB_ROOT_PASSWORD=admin
      - SITE_NAME=mysite.localhost
      - REDIS_CACHE=redis:6379/0
      - REDIS_QUEUE=redis:6379/1
      - REDIS_SOCKETIO=redis:6379/2
    ports:
      - "8000:8000"
    depends_on:
      - db
      - redis

volumes:
  db-data:

⚙️ Environment Variables

The image accepts the following variables for auto-configuration:

VariableDescriptionDefault
DB_HOSTDatabase Host (MariaDB)db
DB_PORTDatabase Port3306
DB_ROOT_PASSWORDDB Root Password (required to create new sites)-
SITE_NAMEName of the site to create or migrate-
REDIS_CACHERedis Cache Connection URLredis:6379/0
REDIS_QUEUERedis Queue Connection URLredis:6379/1
SOCKETIO_PORTPort for Websockets service9000
FRAPPE_APPSBase64 JSON containing apps to install (Dev only)-

🛠️ Development vs. Production

Development

Use the entrypoint /usr/local/bin/dev-entrypoint.sh. This script:

  1. Scans the mounted apps/ directory.
  2. Dynamically installs Python dependencies.
  3. Creates the site if it doesn't exist.
  4. Runs migrations if the site already exists.
Production

Use the default command (Gunicorn). Ensure you build a child image that copies your apps into the image:

FROM edalca/frappe:16
# Copy your apps
COPY apps /home/frappe/frappe-bench/apps
# Install app requirements
RUN bench setup requirements

Tag summary

Content type

Image

Digest

sha256:667864154

Size

670.9 MB

Last updated

about 2 months ago

docker pull edalca/frappe