Link services to themselves
E.g. `fig run db ...` will be able to access the db service.
This commit is contained in:
parent
e0637990aa
commit
e4e9f0bc19
3 changed files with 14 additions and 2 deletions
|
|
@ -49,6 +49,10 @@ Note that this will not start any services that the command's service links to.
|
|||
|
||||
One-off commands are started in new containers with the same config as a normal container for that service, so volumes, links, etc will all be created as expected. The only thing different to a normal container is the command will be overridden with the one specified and no ports will be created in case they collide.
|
||||
|
||||
Links are also created between one-off commands and the other containers for that service so you can do stuff like this:
|
||||
|
||||
$ fig run db /bin/sh -c "psql -h \$DB_1_PORT_5432_TCP_ADDR -U docker"
|
||||
|
||||
## scale
|
||||
|
||||
Set number of containers to run for a service.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue