Search code examples
dockerdocker-composedockerfileboot2dockerdocker-machine

Confused about Docker 1.12 types


I am new to docker and I am a bit confused of what is the difference between Tasks/Containers and between Images/Services. If somebody can explain a little bit about them I will appreciate it.


Solution

    • Image: this is your definition, it contains all the files, environment variables, etc, needed to create a container.
    • Container: this is an instance of an image, it includes the network, places a RW layer over RO image data, attaches volumes, etc
    • Services: These are how swarm manages a running image, with scale it may be multiple containers, and it includes features like service discovery
    • Tasks: They've moved away from this with the GA release and just used docker service ps, but a task is a container within a service
    • Stack: This is a group of services, defined from the experimental DAB "bundle" files. It will become the docker-compose equivalent within Swarm.