docker-compose
used for local dev/test automation with those YAML filesversion: '2' #same as #docker run -p 80:4000 -v $(pwd):/site bretfisher/jekyll-serve services: jekyll: image: bretfisher/jekyll-serve volumes: - .:/site ports: - '80:4000'
.
current working directory
For more exmaples: https://docs.docker.com/
docker-compose +
up
setup volumes/networks and start all containers
down
stop all containeres and remove containers/volumes/networks
:ro
used in volumes. read-only. (cannot change within container)
if all your projects had a Dockerfile
and docker-compose.yml
then new developer onboarding would be:
git clone github.com/some/software
docker-compose-up