Unable to install OpenMRS sdk using docker

I am using a MacBook air(macOS Mojave 10.14) and I am unable to use docker(Docker version 18.09.0, build 4d60db4) to install OpenMRS SDK

I have followed the instructions on the page “https://wiki.openmrs.org/display/docs/Installing+OpenMRS+on+Docker” I have a MySQL(5.6) instance running. As soon as I run the command “docker run -it --rm -p 80:8080 openmrs/openmrs-reference-application-distro” it gives the following error

  • DB_CREATE_TABLES=false

  • DB_AUTO_UPDATE=false

  • MODULE_WEB_ADMIN=true

  • DEBUG=false

  • cat

/usr/local/tomcat/startup.sh: line 8: DB_HOST: unbound variable

@rajgupta why do you want to run it on top of Docker ?

well at first i thought it would make things easier…but now that i have read a bit more in the wiki i realise my mistake…sorry for the inconvenience

you can also post your solution here so as to help others!!

as soon i figure it out myself i will surely do so

you are not an inconvenience at all ,we’re all here to support one another always feel free to ask, share and support…

I have same issue on my windows laptop. Any help appreciated.

error details: Prapakaran@DESKTOP-FJ3JHEA MINGW64 /c/opemmrs/repository/dockerbuild/docker $ docker run -it --rm -p 80:8080 openmrs/openmrs-reference-application-distro

  • DB_CREATE_TABLES=false
  • DB_AUTO_UPDATE=false
  • MODULE_WEB_ADMIN=true
  • DEBUG=false
  • cat /usr/local/tomcat/startup.sh: line 8: DB_HOST: unbound variable

i will be waiting for the solution coz am experiencing challenges with installing the OpenMRS sdk

Does it work if you do not use the docker option?

I think there’s a little bit of confusion going on here.

The OpenMRS SDK is not a docker image and it’s not run from docker. https://wiki.openmrs.org/display/docs/OpenMRS+SDK It’s a maven plugin.

You can use the OpenMRS SDK to run OpenMRS platform and reference application (and dedicated mysql instance) using docker.

But indeed that documentation looks wrong. I updated https://wiki.openmrs.org/display/docs/Installing+OpenMRS+on+Docker with things that should work. Please update if that’s not correct.

I strongly recommend to use docker-compose instead of bare docker commands.

Hello, what was the solution to this error, I am also experiencing the same. C:\Users\hkaluuma>docker run -it --rm -p 8888:8080 openmrs/openmrs-reference-application-distro:demo

  • DB_CREATE_TABLES=false
  • DB_AUTO_UPDATE=false
  • MODULE_WEB_ADMIN=true
  • DEBUG=false
  • cat /usr/local/tomcat/startup.sh: line 8: DB_HOST: unbound variable

Have you tried options other than Docker?

Generally speaking, we recommend using docker-compose over bare Docker. However, you need to run the Docker command with -e DB_HOST=... where ... is the host name of a MySQL server that the Docker container can talk to. You may also need to specify -e DB_USERNAME=... and -e DB_PASSWORD=... to match your MySQL configuration.

Thank you, Let me try that out

Thank you, let me try that

The other options of installing openmrs turned out to be more complicated for me.

@ibacher , Thank you the suggested solution fixed that error.