Secure Frappe Framework runtime. Optimized for multi-stage builds and non-root execution
3.2K
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.
frappe user, adhering to container security best practices.pip install in development).yarnwkhtmltopdf (QT patched), mariadb-client, postgresql-client, redis-tools, nginx.dev-entrypoint.sh, nginx-entrypoint.sh) that automatically configure DB/Redis connections and generate common_site_config.json at startup.| Tag | Frappe Version | Python | Node.js | Status |
|---|---|---|---|---|
16, latest | v16 (Develop) | 3.14 | v24 | Edge / Experimental |
15 | v15 (Stable) | 3.11 | v20 | Stable / Production |
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:
The image accepts the following variables for auto-configuration:
| Variable | Description | Default |
|---|---|---|
DB_HOST | Database Host (MariaDB) | db |
DB_PORT | Database Port | 3306 |
DB_ROOT_PASSWORD | DB Root Password (required to create new sites) | - |
SITE_NAME | Name of the site to create or migrate | - |
REDIS_CACHE | Redis Cache Connection URL | redis:6379/0 |
REDIS_QUEUE | Redis Queue Connection URL | redis:6379/1 |
SOCKETIO_PORT | Port for Websockets service | 9000 |
FRAPPE_APPS | Base64 JSON containing apps to install (Dev only) | - |
Use the entrypoint /usr/local/bin/dev-entrypoint.sh. This script:
apps/ directory.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
Content type
Image
Digest
sha256:667864154…
Size
670.9 MB
Last updated
about 2 months ago
docker pull edalca/frappe