Builds, (re)creates, starts, and attaches to containers for a service.
# if the image is already present then# this will not build the image and will run directlydocker-compose up# detached mode: run containers in the backgrounddocker-compose up -d# build the image and then rundocker-compose up --build# run a particular servicedocker-compose up [service-name]
Stop application
# stops and deletes containersdocker-compose down
Build
Performs building docker image from source
Services are built once and then tagged, by default as project_service
If you change a referenced Dockerfile locally, then it will rebuild the images
It does not run the docker images
docker compose build# build specific servicedocker compose build [service-name]