Docker-compose up

From wikieduonline
Revision as of 14:33, 18 January 2020 by Welcome (talk | contribs) (→‎Examples)
Jump to navigation Jump to search
  • docker-compose up[1] Builds, (re)creates, starts, and attaches to containers for a service.
docker-compose up -d
-d daemon


https://docs.docker.com/compose/reference/up/ If there are existing containers for a service, and the service’s configuration or image was changed after the container’s creation, docker-compose up picks up the changes by stopping and recreating the containers (preserving mounted volumes). To prevent Compose from picking up changes, use the --no-recreate flag.


Examples

  • docker-compose up
  • Build containers but do not start them:
docker-compose up --no-start
  • Upgrade a container:
docker compose pull && docker-compose up -d

Related commands

See also

  • https://docs.docker.com/compose/reference/up/
  • Advertising: