I was able to get the latest dev version of OpenEMR running with Mac Docker Desktop.
There were two problems, one mac related, the other not.
(1)
The docker container created by Easy Development uses the newest version of PHP, which does not work with OpenEMr. I had to change the image in compose.yml from the newest one (openemr-flex) to an older one (openemr-flex-3.18). Easy to fix, but openemr or openemr dev ops needs to be fixed so this does not need to be done.
(2)
On the mac, the files in the .git directory are read only, not write. When docker tries to copy the files in the .git directory, it throws errors, and won’t start. This was fixed by my doing the following command:
chmod -R 755 .git
However, I need to do this everytime I change my git branch, and extra step which should not be necessary.
Docker has no reason to copy or look at the files in the .git directory. So, the obvious solution is .dockerignore. I created this file but cannot get it to work. I put it in the same folder as compose.yml. I also tried to put it in openemr directory. Still won’t work.
I see that the devops repo has .docker ignore and it has the definitions of openemr flex. Do I need to change something in dev ops. I know we use openemr-cmd from devops but I can’t see how it can access other things in devops.
So, please give me advice about how I can use .dockerignore in the openemr docker so that it ignores the .git directory files.
It’s strange that the latest image doesn’t work for you. I’ve been using it successfully for months, and I do pull frequently. One possible explanation is that I may be setting the arch to linux/amd64 despite having an arm MacBook, but that doesn’t have anything to do with the php version per se.
While trying to fix problem #2, I changed the file “compose.yml” while the docker was up, then I closed the docker with “openemr-cmd down”. Then, I did the command “openemr-cmd up”.
Brady showed me the problem and the solution.
Apparently, this caused docker to create an extra volume that lingers after command is sent for “openemr-cmd down”.
This volume showed up with the command “docker volume ls”. volume name was “development-easy_publicvolume”.
The following command solved the problem:
“docker volume rm development-easy_publicvolume”
Regarding Problem #2
Thank you for your pull request. It was an 80% fix. Errors are thrown but they don’t appear to be fatal like the ones from before.
openemr.sh does a lot of stuff when the container starts up. I’m motivated to fix anything that it does that’s problematic, so if you encounter problems, please create a ticket at openemr-devops and I’ll take a look.