Difference between revisions of "Docker-compose up"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Tags: Mobile web edit, Mobile edit
Line 14: Line 14:
 
== Examples ==
 
== Examples ==
 
* <code>docker-compose up</code>
 
* <code>docker-compose up</code>
 +
* <code>docker-compose up SERVICE_NAME</code>
 
* Build containers but do not start them:
 
* Build containers but do not start them:
 
  <code>docker-compose up --no-start</code>
 
  <code>docker-compose up --no-start</code>

Revision as of 12:37, 27 January 2020

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

  • docker-compose up or docker-compose up SERVICE_NAME [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.

docker-compose up, and docker-compose start will now start containers in parallel where possible.


Examples

  • docker-compose up
  • docker-compose up SERVICE_NAME
  • 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: