August 2014 / Alexis DUQUE / alexis.duque@openmrs.org
A website on which members of the OpenMRS Community can register their site(s).
Apache HTTP, PHP 5.5, MySQL 5, phantomJS 1.9.7, Composer, Laravel4, OpenMRS ID, ...
Daemon, CLI, Local Index
Image repository, Automated Builds, Versioning, Hooks.
https://docs.docker.com/installation/#installation
Require Linux-specific features, but solution for others !
Lucky Ubuntu Users
curl -sSL https://get.docker.io/ubuntu/ | sudo sh
Windows/MacOS Users
docker pull openmrs/atlas:2.0-dev
Clone dev image from openmrs/atlas repo to your local repository
docker run [params] openmrs/atlas:2.0-dev
Lot of parameters - 3 modes :
docker run -P [host_port:container_port] openmrs/atlas:2.0-dev
Example : 8080 container port to 80 host port
docker run -P 80:8080 openmrs/atlas:2.0-dev
80 host port shouldn't be used !
docker run -v [host_folder:container_folder] openmrs/atlas:2.0-dev
Example : mount /opt/dev to /opt in the container
docker run -v /opt/dev:/opt openmrs/atlas:2.0-dev
Absolute path is required !
docker run -e VAR_NAME=value -e VAR_NAME2=value2 openmrs/atlas:2.0-dev
Example : define HOST_IP in the container
docker run -e HOST_IP=127.0.0.1 openmrs/atlas:2.0-dev
Define hostname inside the container
docker run -h [hostname] openmrs/atlas:2.0-dev
Define container name (~ container id)
docker run --name [container_name] openmrs/atlas:2.0-dev
Start a container from your local registry
docker start [container_name] | ex: docker start atlas
Stop a running container
docker stop [container_name] | ex: docker stop atlas
Show running container
docker ps
Show images on your registry
docker images
Delete a single container or image (-f to force)
docker rm -f [container_name] | ex: docker rm atlas
docker rmi [image_name] | ex: docker rmi openmrs/atlas:2.0-dev
Clean all containers and untagged images
docker rm `docker ps --no-trunc -aq`
docker rmi $(sudo docker images -f "dangling=true" -q)
docker built -t [image_name] path_to_dockerfile
http://stackoverflow.com/search?q=docker
http://alexisduque.github.com/docker-presentation http://alexisduque.github.io/blog/2014/08/10/docker-for-developers