Docker has a quite convenient way to link the main container to a db container with a command like:
docker run --link db:db user/main
This is very convenient already. However, I believe it's still clumsy compared to a command like:
docker run user/ultra
where ultra
is a container that is already linking the main container to the db container.
Is that possible that I can achieve this by writing a good Dockerfile
.
I suppose I can start the Dockerfile
with
FROM user/main
but how do I get the second container involved and then link them with Dockerfile
?
Thanks.