Upload
james-turnbull
View
2.314
Download
1
Embed Size (px)
Citation preview
Docker Compose• Fast, isolated development environments using Docker.
• Quick and easy to start.
• Manages a collection of containers.
16
Compose basics• Build your apps with Dockerfile's.
• Combine applications and images with a docker-compose.yml file.
18
The DockerfileFROM ubuntu:14.04RUN apt-get -yqq updateRUN apt-get -yqq install nodejs npmRUN ln -s /usr/bin/nodejs /usr/bin/nodeRUN mkdir -p /var/log/nodeappADD nodeapp /opt/nodeapp/WORKDIR /opt/nodeappRUN npm install
19
The docker-compose.yml filedb: image: redis ports: - "6379"web: image: jamtur01/0redevdemo command: nodejs server.js ports: - "3000:3000" links: - db
20
Compose details• Can build images, use existing or pull images
• Can map ports, manage links and create volumes
• Still single host centric.
21
Machine benefits• Automatically build Docker servers.
• Manage Docker servers.
• Target local and cloud nodes.
27
Docker Swarm• Clustering (management) for Docker.
• Manage multiple Docker daemons.
• Distribute workloads.
29