Docker is a machine virtualisation system based on container.
On a machine (called docker host) containing docker tools, we can run containers based on an image. An docker image can be seen as an ISO image and container is a running version of an image.
A docker package can be downloaded here.
brew install docker docker-compose docker-machine docker-machine-driver-xhyve
Read the documentation.
# Pull base image.
FROM elasticsearch:2.1.1
# Install HEAD plugin
RUN \
plugin install http://xbib.org/repository/org/xbib/elasticsearch/plugin/elasticsearch-aggregations/2.1.1.1/elasticsearch-aggregations-2.1.1.1-plugin.zip \
postgresql:
image: postgres
environment:
- POSTGRES_USER=invenio3
- POSTGRES_DB=invenio3
- POSTGRES_PASSWORD=dbpass123
ports:
- "5432:5432"
redis:
image: redis
ports:
- "6379:6379"
elasticsearch:
build: .
ports:
- "9200:9200"
- "9300:9300"
rabbitmq:
image: rabbitmq:3-management
restart: "always"
read_only: true
ports:
- "5672:5672"
- "15672:15672"
docker images
docker ps
docker ps -a
docker-compose up
docker-compose stop
docker-machine create -d xhyve my_machine
docker-machine start my_machine
docker-machine stop my_machine
docker-machine rm my_machine
docker-machine ip my_machine
docker-machine env my_machine