I'm following the userguide on dockerlinks
I followed these steps as follows :
sudo docker run -d --name db training/postgres
sudo docker run -d -P --name web --link db:db training/webapp python app.py
sudo docker inspect -f "{{ .HostConfig.Links }}" web
In this last step, the guide asserts the return value of [/db:/web/db]
What I'm receiving is <no value>
Why are the containers not linking?
The apt-get repositories include docker version 1.0.1, but HostConfig.Links
doesn't show up in the documentation until version 1.3 (See the version switcher under the "Search the Docs").
You can verify that this is the problem by running docker --version
.
If you want the latest version of docker (1.4), you should uninstall docker.io and follow the directions here: http://docs.docker.com/installation/ubuntulinux/#docker-maintained-package-installation . In particular see the note, as you can just run:
curl -sSL https://get.docker.com/ubuntu/ | sudo sh
That will also give you some other nice features that are missing from the version in the Ubuntu repository, such as exec.
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加