Public | Automated Build

Last pushed: 2 years ago
Short Description
erpnext docker image
Full Description


Erpnext docker image

  • Based on: debian:wheezy
  • Including services:
    • Redis
    • Nginx
    • Maridb
    • cron

Install with:

run data container

docker create -v /home/frappe/frappe-bench/sites/site1.local/ -v /var/lib/mysql --name erpdata davidgu/erpnext

run erpnext

docker run -d -p 80:80 --name erpnext --volumes-from erpdata davidgu/erpnext

get passwords

docker exec -ti erpnext cat /root/frappe_passwords.txt
Login on http://localhost with Administrator / password

Upgrade from a 4.0 container

# upgrade run container
docker stop erpnext
docker rm erpnext
docker pull davidgu/erpnext

# start run container
docker run -d -p 80:80 --name erpnext --volumes-from erpdata davidgu/erpnext

# upgrade data container
docker exec -ti erpnext bash
chown -R mysql /var/lib/mysql
cd /home/frappe && bench update --upgrade
Docker Pull Command
Source Repository

Comments (4)
a year ago

Hi, thanks for the docker image! I used it to install ERPNext on a Digital Ocean One-click "Docker 1.12.3 on Ubuntu 16.04" droplet (2-CPU, 2GB RAM), the install was error-free. However the version of ERPNext that was installed is v5.0.7 (Desk -> [Administrator] -> About), while the single-user instance I created last month is v7.0.63. Is this reasonable? Is it possible upgrade the version of ERPNext I installed using the docker script?

2 years ago

Hi there, I think there is a security problem with this image. I think that the passwords Are generated during the image build which means that everyone using this image is sharing the same password.

Also, I just tried to update ERPNext with a new version and despite having put my data in the linked data container as suggested, rerunning the build of the Docker image created new mysql passwords.

I had to bash into the container to fix this. Then I was able to run the bench update --patch migrations.

So my thoughts to make this image more useful would be to follow best practices. A Dockerfile which I'm aware of, which I think does this well is this Open Project docker repo

The main COMMAND of the container is a script which checks if it's the first time the image is ran (by checking a .set-complete file in the container). When an updated image (rebuilt or downloaded from the docker hub) is ran, it runs a script which is idempotent and runs migrations as well as recompile assets, seeds the database - this is also idempotent and doesn't change anything if the database already has data.

It would also work for the erpnext container's password generation which would execute the password generation as part of the container's first time running (so that it's not in the image file) and wouldn't create a new one on updates.

Hope this is useful feedback!

PS: This is crossposted here: and in a downstream forked image

2 years ago

The docker logs says ""Error running command in existing container 14c04ef108348e3dd488399b1a80d4a3f72905a16d72c991b482645fe58660cb: [8] System error: no such file or directory"

time="2015-10-18T21:02:16.395142362Z" level=error msg="Handler for POST /exec/{name:.*}/resize returned error: bad file descriptor"
time="2015-10-18T21:02:16.395167854Z" level=error msg="HTTP Error" err="bad file descriptor" statusCode=500
time="2015-10-18T21:02:16.395224497Z" level=error msg="Error starting exec command in container dddfb39d431f53c462058795312a914dbb72512859870e556ab648b1

2 years ago

I got stuck on "docker exec -ti erpnext bash"
It does not work, I cannot open a terminal to the container.
the cat /root/frappe_passwords.txt does not work, so even if the erp runs, it is useless ;-(

Client: Version: 1.8.3 on debian 7