change on host will effect file inside the container • any file change inside the container will change the file on the host • files will be persisted even the container is stopped
image when possible • auto start the container with CMD or ENTRYPOINT specified in that image • use all configurations from that image • configurations will be overwritten by commands specified in docker-compose.yml
ruby image • depends on db, so we have db started before the Rails app • map host port 3000 into container port 3000, so we can access the web app from browser