mirror of https://github.com/docker/docs.git
parent
089d9100fd
commit
b68ad3aced
|
@ -26,7 +26,7 @@ Runs a one-time command against a service. For example, the following command st
|
|||
|
||||
docker-compose run web bash
|
||||
|
||||
Commands you use with `run` start in new containers with the same configuration as defined by the service' configuration. This means the container has the same volumes, links, as defined in the configuration file. There two differences though.
|
||||
Commands you use with `run` start in new containers with the same configuration as defined by the service' configuration. This means the container has the same volumes, links, as defined in the configuration file. There are two differences though.
|
||||
|
||||
First, the command passed by `run` overrides the command defined in the service configuration. For example, if the `web` service configuration is started with `bash`, then `docker-compose run web python app.py` overrides it with `python app.py`.
|
||||
|
||||
|
|
Loading…
Reference in New Issue