need for environmental setup by a different group (DevOps, SRE, Sysadmin, etc) Environmental Consistency from local development to production, regardless of what Operating System developer x is using. Configuration is traditionally managed by environmental variables, allows a immutable build to pass from development to production.
its dependencies. Dependencies can vary from project to project without interfering / causing unintended consequences. Operational team doesn’t have to figure out multiple versions of PHP, Node, etc for building or hosting.
VirtualBox (by default, can use HyperV, VMWare, etc) Use docker quickstart or create your own VM with docker- machine create All of the exposed ports of Docker Containers will be reachable via docker-machine ip <vmname> Requires some env variables specifically you need to source docker-machine env <vmname> Works with the built-in virtualization toolset (hyperv on Win10, xhyve on Mac). Requires Admin rights. Min. requirement Win10 Pro or OSX Yosemite (10.10). Exposes ports on Localhost. Docker cli just works.
docker-machine create default source docker-machine env default Works on both windows (powershell and cmd) and mac (bash). Edit host file and add: <docker-machine ip> yourlocaldev.site.com
Run docker app (will create an icon in the system tray, you can configure vm specs there) Works on both windows (powershell and cmd) and mac (bash). Edit host file and add: 127.0.0.1 yourlocaldev.site.com
base image MAINTAINER – your name. RUN – execute something on the container COPY / ADD – copy something to the container ENV – set an environmental variable WORKDIR – Set the working directory (where stuff gets executed) CMD – The command a container executes when it’s started. ENTRYPOINT – Like CMD but different EXPOSE – Show a port to your network More: https://docs.docker.com/engine/reference/builder/
the engine (start/stop containers, build images, etc, Swarm is buried here) docker-machine Wrapper around virtual machines for Windows/Mac so we can run docker locally. docker-compose Helper that works with “compose files” to define an entire stack.
are to be run on the swarm cluster. Can specify mounts, images, tags, names, hostname, environmental variables, update strategy …………………… Can be really simple too.
Host for loadbalanced endpoint is the service name. i.e. Redis Mesh Routing: if I expose port 80 on one node, port 80 is available across the swarm cluster. Failure Detection: container fails a health check, it’s bounced; worker becomes unavailable, swarm reschedules its containers on other nodes. Resource Allocation: Can define dedicated memory/cpu per container.