Frappe Docker Bootstrapper
One‑command, Docker‑based Frappe development environments – fully isolated, version‑selectable, and ready for VS Code DevContainers.
Stop wasting time on manual setup. This repository provides two bash scripts that spin up a complete Frappe development stack (Frappe + MariaDB + Redis) inside Docker, with automatic Python, Node, and Yarn version management. Perfect for multi‑project developers, contributors, or anyone who wants a pristine Frappe environment in minutes.
Features
- Choose your Frappe version –
version-13/14/15/16/develop
(thesetup_frappe16.shscript locks to v16 with Python 3.14.0 and Node 24) - Fully isolated per project – each project gets its own containers, volumes, ports, and Redis instances – no conflicts, even when running multiple projects simultaneously.
- Automatic environment setup inside the container – pyenv, nvm, and corepack handle Python, Node, and Yarn versions seamlessly.
- One‑command bench initialization –
bench init, site creation, developer mode, and optional ERPNext installation. - Ready for VS Code DevContainers – the generated project includes a
.devcontainerfolder; just reopen in container for a full IDE experience. - Helper scripts –
start.sh,stop.sh,console.sh,status.sh– manage your environment effortlessly. - No sudo needed – everything runs inside the Docker container; your host stays clean.
Prerequisites
Make sure you have the following installed on your system:
- Docker (20.10+)
- Docker Compose (v2, included with Docker Desktop)
- Optional but recommended: Visual Studio Code with the Dev Containers extension
Quick Start
-
Clone this repository
git clone https://github.com/pra11shant/frappe-docker-bootstrapper.git cd frappe-docker-bootstrapper -
Make the scripts executable
chmod +x *.sh -
Run the bootstrapper that fits your needs
-
For Frappe v16 (fixed versions):
./setup_frappe16.sh -
For Frappe v13–v15 or develop (version selection):
./setup.sh
-
Follow the interactive prompts – you’ll be asked for:
- Project name (e.g., myapp)
- Install ERPNext? (y/n)
- Base web port (e.g., 8010) – the socket port will be automatically set to port+1000
-
Wait – the script will:
- Clone frappe_docker
- Create and start the Docker containers
- Install Python, Node, and Yarn inside the container
- Initialize the bench, create a site, enable developer mode, and optionally install ERPNext
- Generate helper scripts and a PROJECT_INFO.md file
- Finally like this
-
Start developing
cd your-project-name ./start.sh # starts the bench inside the container
Visit http://your-project.localhost:8010 (or the port you chose) – default admin password is admin.
Project Structure (generated per project)
your-project/
├── .devcontainer/
│ ├── docker-compose.yml # services definition
│ └── devcontainer.json # VS Code configuration
├── development/ # bench will be created here
├── .env # environment variables
├── start.sh # start bench
├── stop.sh # stop containers
├── restart.sh # restart containers
├── console.sh # open bash inside frappe container
├── status.sh # show running containers
├── vscode.sh # open project in VS Code
└── PROJECT_INFO.md # summary of your project (ports, credentials, paths)
Using VS Code DevContainer
- Open the generated project folder in VS Code.
- Press Cmd+Shift+P (or Ctrl+Shift+P) and select Dev Containers: Reopen in Container.
- VS Code will rebuild the container and attach to it – you can now edit code, run bench commands, and debug directly inside the environment.
Scripts Overview
setup.sh
- Interactive version selection (v13, v14, v15, develop)
- Uses fixed Python/Node versions per Frappe version:
- v13 → Python 3.9.17, Node 14
- v14 → Python 3.10.13, Node 16
- v15/develop → Python 3.11, Node 18
- Uses fixed Python/Node versions per Frappe version:
setup_frappe16.sh
- Strictly for Frappe v16 with the latest stable toolchain:
- Python 3.14.0
- Node 24
- Yarn 1.22.22
- Suitable for new projects targeting v16.
Both scripts automatically:
- Set socketio port to webport + 1000
- Remove Redis and socketio entries from Procfile (since socketio is integrated with the web process in v16)
- Configure MariaDB and Redis hosts via bench set-config
Important Notes
- Ports – you choose the web port; the socketio port will be webport + 1000. Make sure these are free on your host.
- Multiple projects – each project uses its own Docker Compose project name (derived from your project name) so there are no collisions.
- Data persistence – MariaDB data is stored in a named volume (e.g., myapp_mariadb_data), so your data survives container restarts.
- Administrator password – default is admin. You can change it via bench --site yoursite set-admin-password.
- **ERPNext – **if you choose to install it, the script will fetch the same branch as Frappe and install it automatically.
Docker Details
The generated environment includes four containers:
Container -> Purpose
mariadb -> MariaDB 11.8 database
redis-cache -> Redis for caching
redis-queue -> Redis for background jobs and SocketIO
frappe The main container with bench, Python, Node, and your code
The frappe container uses the official frappe/bench:latest image and runs sleep infinity to stay alive; you start the bench via ./start.sh.
Contributing
Found a bug or have a suggestion? Feel free to open an issue or submit a pull request. All contributions are welcome!
License
This project is licensed under the MIT License – see the LICENSE file for details.
Need Help?
Check the generated PROJECT_INFO.md inside your project folder.
Open the container console with ./console.sh and run bench --help.
Refer to the Frappe Framework Documentation.
Happy coding! ![]()