For OS X installs only!
Install the Docker Toolbox: https://docs.docker.com/mac/step_one/
All of the following instructions should be executed in the terminal, i.e. command line. If you are not in the office, ensure that your VPN is connected.
Create a new docker-machine using the overlay file system. This is necessary since the "default" docker-machine uses the AUFS file system which has shown to have issues which should be addressed with the next release of docker (1.9.2, I believe).
docker-machine create --driver virtualbox --engine-storage-driver overlay pci-service
Verify that the docker-machine is running by executing the following command and observing that the pci-service is in a running state and has a public URL (this is the docker url, NOT the application url).
docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS pci-service - virtualbox Running tcp://192.168.99.100:2376 v1.9.1
Make the docker-machine available to the environment by running the following commands:
docker-machine env pci-service export DOCKER_TLS_VERIFY="1" export DOCKER_HOST="tcp://192.168.99.100:2376" export DOCKER_CERT_PATH="/Users/jerryjasperson/.docker/machine/machines/pci-service" export DOCKER_MACHINE_NAME="pci-service" # Run this command to configure your shell: # eval $(docker-machine env pci-service)
Take note of the IP address as this will be the server ip you'll connect to access the pci web application!! In our example, the ip address is 192.168.99.100.
Execute this command to make the container available to docker (docker associates its images to docker-machine via environment variables).
eval $(docker-machine env pci-service)
Install the pci-service docker image. This will pre-load the docker image onto your machine; the docker run command will do the same, however, this command pulls the image prior to execution.
docker pull jdjasperson/pci-service:2.0
Verify that the image is now available locally:
docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE jdjasperson/pci-service 2.0 546240551f35 15 hours ago 407.3 MB
Start the image in the pci-service container:
docker run -d -p 8080:8080 --name=patientcheckin jdjasperson/pci-service:2.0 /usr/local/tomcat/bin/catalina.sh run
Wait about a minute so that the container gets fully initialized; it doesn't have a whole lot of resources available to it, so it will be slower than running it directly on your laptop.
Now, open a Google Chrome browser and enter the following into the address bar, substituting the IP address you'd taken note of earlier for your container:
http://$YOUR_CONTAINER_IP_GOES_HERE$:8080/patientcheckin/?clinicId=1271 From our previous example, here's what we'd observe: http://192.168.99.100:8080/patientcheckin/?clinicId=1271
Voila!! You should see the PCI application!! All from Docker!!
To shut down the application, perform the following steps:
1. docker attach patientcheckin 2. press ctrl-c
That should cause the container process to exit.
To shut down the container:
docker stop pci-service
To re-start the previously named container (patientcheckin). If you attempt to re-run the container, you'll receive an error to the effect that there's already a container with that name.:
docker start patientcheckin