Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning
titleWARNING

This page has been Archived, and is obsolete. It is available on the Bahmni wiki only for reference and historical purposes.

Instead of deleting a page, we prefer to "archive" it, so that it is still available to people who have bookmarked the page.


Warning

Note that Docker based setup may seem complicated, and difficult, for people who have never worked with Docker.

 

Please do not refer to this document for Bahmni setup if you are new to Docker, since we may not be able to help you if you have issues. It is recommended to instead refer to Virtual Box (Vagrant) based steps, which are much easier. This document is only for reference for Advanced users who are already familiar with Docker. Instead, please refer this document: Bahmni Virtual Box

...

The following step-by-step guide helps you in installing Bahmni using Docker. Docker is an open platform for developers and system admins to build, ship, and run distributed applications. Following instructions are mainly targeted for Mac OS X and Linux users. But they should work with any operating system that supports Docker.  

Installing Docker

    • On Linux

      1. Open a terminal and run 'curl https://get.docker.com | $SHELL'.  Or if you don't have 'curl' installed in your system try using 'wget -O - https://get.docker.com | $SHELL'.
        Note: If you can't use any of the above tools in your system, then visit https://get.docker.com in your browser, save the displayed script and run in your favorite shell. (smile)

      2. After the above step completes, run 'sudo usermod -aG docker $USER'. This command will add you to the docker group, so that, you can run docker command without needing sudo.

        Info
        titleDocker Command

        docker

    • On Mac OS X / Windows

      1. Download and install the boot2docker package. Complete the installation using default selections. In case you get a message that "Running Virtual Box detected", please shutdown all the vms and restart the installation. Details on understand boot2docker - http://viget.com/extend/how-to-use-docker-on-os-x-the-missing-guide

      2. Set the following environment variables in your .bashrc or .zshrc file (source .bashrc to get your changes reflected)

        Info

        export DOCKER_HOST=tcp://192.168.59.103:2376
        export DOCKER_CERT_PATH=~/.boot2docker/certs/boot2docker-vm
        export DOCKER_TLS_VERIFY=1

      3. Start the boot2docker (installed in previous step) using the following command.  The "boot2docker init" command is required only for the first time.

        Info
        titleStarting Boot2Docker

        boot2docker init

        boot2docker up

      4. Try executing the following command to check if your installation was successful.

        Info
        titleDocker Command

        docker

...

  1. Sometimes, running the "docker ps" command gives a timeout issue.  Looks like its an issue with docker 1.6.2 and people are tracking it here
    http://stackoverflow.com/questions/26686358/docker-cant-connect-to-boot2docker-because-of-tcp-timeout
  2. On Linux based OS, make sure to install "ruby-dev" and "npm-legacy" packages as well to avoid build failures on openmrs-distro-bahmni and openmrs-module-bahmniapps
  3. When using boot2docker and docker pull is giving timeout, try this:

    Info
    titleDocker pull timeout

    boot2docker down

    #Add a rule to forward traffic from 127.0.0.1:2376 to port 2376 on the boot2docker vm:

    vboxmanage modifyvm "boot2docker-vm" --natpf1 "docker,tcp,127.0.0.1,2376,,2376"

    boot2docker up

    $(boot2docker shellinit)

    export DOCKER_HOST=tcp://127.0.0.1:2376

     

Dev setup using Vagrant and Docker - https://gist.github.com/craigbarrau/05771d6ca28873548c90

...