I was going through volumes_from
option in docker compose. Apparently you can import a volumes from either a container or a service. From the docker compose documentation it is:
volumes_from
Mount all of the volumes from another service or container, optionally specifying read-only access(ro) or read-write(rw).
volumes_from: - service_name - service_name:ro - container:container_name - container:container_name:rw
Note: The container:... formats are only supported in the version 2 file format. In version 1, you can use container names without marking them as such:
- service_name - service_name:ro - container_name - container_name:rw
I am confused here what is the difference between containers and services here?
question from:https://stackoverflow.com/questions/35565770/difference-between-service-and-container-in-docker-compose