I linked my app container to postgres on run
:
docker run --link postgres:postgres someproject/develop
and it worked fine.
True, but docker build
does accept the --network
option.
You can put your prerequisite containers on a named / custom network, e.g.:
docker network create whatever
docker run --network whatever --name postgres [etc.] someproject/develop
Then build on that network:
docker build --network whatever [etc.]
Works well.