Read about OpenEMR's Response to the COVID-19 Pandemic at

OpenEMR Official Docker has been released!

See this post for example of using OpenEMR docker:



Another cool docker update/example. Because of @gutiersa, OpenEMR now works with nginx. I incorporated this into a docker solution/stack, which demonstrates the use of the same OpenEMR instance on nginx and apache.

To see this in action, click on the following which is OpenEMR development version 5.0.2 using both apache and nginx:
Try it!

Clicking on the above button(s) will take you to (you need to login to use this site; you need to create an account at and then use these credentials to log into where your very own requested demo will be magically built.

Let the process go for about 4-5 minutes. And then will see the following ports to try:
Port 80 is nginx with php 7.1
Port 81 is nginx with php 7.2
Port 82 is apache/php (the standard docker use)

Note they are all using the same openemr instance and here is the docker-composer.yml that builds this stack: )


1 Like

Here’s a related thread on Docker Swarm for OpenEMR:

1 Like


We have a plug and play (at least hopefully it is plug and play) support for a dockerized openemr environment for developers and testers. Can check out how you can get it going here:
openemr/ at master · openemr/openemr · GitHub

Note you can now easily test OpenEMR with PHP 7.3-beta in this docker environment, so we can iron out any PHP 7.3 issues before PHP 7.3 is even released :slight_smile:


1 Like

Hello, I would like to ask whether anyone could kindly suggest why root:root does not work when I tried to login phpMyAdmin from port 81? I used the exact same docker commands as above to start the containers. Thanks!

hi xwow,

There’s a lot going on in this thread. Can you paste the commands (or the docker-compose.yml file) you used here.


Hello !

English is not my native language, so bear with me and be kind please! :grin:

I love the idea of openEMR for the institution i’m working, because we have a free clinic to serve the students of our college and the community around ourselves. I’m an IT support who aspires to change to infrastructure as soon as possible and i’ve proprosed an instalation of openEMR to better attend the patients but i’m having some trouble.

My colleague say’s that we already have a database on the cloud (AWS) and he gave me the mission to build the dockerfile and test on my machine (local) an instalation of openEMR, so we can push into our repository and use the ECS service to run. He will help me on the DNS and stuff, but for now, i’m only capable of making a dockerfile that runs openEMR but i have to install it, and openEMR doesn’t install without a database to connect to. So i can’t finish up the image to push to our repository on AWS.

I’ll paste here my dockerfile and it’ll be great to have some inputs and directions. As you can see, i’m sending the default config for the nginx from my computer, and i wish i could do the same with openEMR to skip the installation. Is it possible?

FROM ubuntu:16.04
MAINTAINER Diogo dos Santos “”
ENV NGINX_VERSION 1.9.3-1~jessie
RUN apt-get update && apt-get install -y nginx php7.0-fpm && apt-get clean
RUN apt-get install libapache2-mod-php libtiff-tools php-mysql php-cli php-gd php-xsl php-curl php-soap php-json php-gettext imagemagick php-mbstring php-zip php-ldap -y

RUN ln -sf /dev/stdout /var/log/nginx/access.log
RUN ln -sf /dev/stderr /var/log/nginx/error.log
VOLUME ["/var/cache/nginx"]
RUN rm /etc/nginx/sites-available/default
ADD ./default /etc/nginx/sites-available/default
WORKDIR /var/www/html
COPY ./openemr-5.0.1.tar.gz /var/www/html
RUN tar -xvzf openemr-5.0.1.tar.gz
CMD service php7.0-fpm start && nginx -g “daemon off;”

Anyway, thanks for reading this long post. It will be a great service to our college and community to have this working here.

ps: I already looked at the docker-compose swarm stuff that you guyz made, and it’s amazing!

hi @Diogo_Santos ,
Installation is taken care of in the official OpenEMR docker, if you wish(and you could even point it to the database you are using on AWS). Would recommend using that instead of trying to rebuild it. And would separate out the nginx and php-fpm into other dockers. For production, I’d rec using apache/php, which is already on the official OpenEMR docker (although we do have sample docker-compose.yml scripts out there that do show how to use nginx/php-fpm dockers, if you really wish).

Check out this thread for using OpenEMR with Kubernetes:

Check out this thread for instructions on using OpenEMR docker on Ubuntu 18.04:

Tested and updated installation instruction.

1 Like

I had a lot of hurdles to jump through yet I managed to compile and run OpenEMR’s docker on my Raspberry Pi (this isn’t ideal yet it is possible to do).

I tried the docker on ubuntu 18.04 but no luck. Everything gets built and i do see 80 and 443 links. But on clicking i get
" This page isn’t working didn’t send any data."

I have enabled pop ups and it is not a CORS issue either.

hi @Atul_Kumthekar , Which docker link to you try?

Are these dockers still working? I am trying to troubleshoot my installation by comparing a docker install to mine (since I am running an nginx install.)
These are not opening for me.
Are these still good?
I am running
FreeBSD 12.1
Nginx 1.18.0
Mysql 5.7
Openemr 5.0.2v2
The portal is not working for me. I would like to make sure my install is complete first before I start posting my logs.
Please help. Consider me whining!

hi @gutiersa ,
Yep, all still going (all these environments/dockers are tested in travis in github; ie. pull requests and new commits start a new testing run). Notably, though, the portal is not tested and I would not be surprised if there may be problems with the patient portal on nginx, since nobody has really deeply tested/used it on nginx and it involves a apache .htaccess rewrite that was converted to nginx without much testing.

I do have that line but in the context of:

if (!-e $request_filename) {

should I remove the if part?
Why am I not able to access the docker site?
When I click on the port a new window opens saying the site cannot be reached.
isnt the sandbox supposed to show me the running site too?

Well, maybe if you tell me where in the openemr file system the portal is, then I can figure out the rewrite rules for nginx
Also, where is the documentation for the modules? If I can read up on that, may if I can figure that out, then that can help me with the portal as well.
Thanks again.

hi @gutiersa ,

Above is also in context of if (!-e $request_filename) {. Here’s the link to the full nginx script:
openemr/nginx.conf at master · openemr/openemr · GitHub

What docker setup are you using now (just paste the docker-compose.yml here)?

Portal is in the /portal directory.

I’ll try out the portal on nginx via the insane docker dev environment (openemr/contrib/util/docker at master · openemr/openemr · GitHub) soon since currently trying to figure out how to get the API to work on nginx.

Yes, I am using it from the master at github.