Docker Not Linking Containers

user1928626

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?

Paul

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]

編集
0

コメントを追加

0

関連記事

分類Dev

Linking Docker Containers

分類Dev

How to list containers in Docker

分類Dev

Building Docker Containers in VSTS

分類Dev

Docker compose linking appears to not work

分類Dev

Log management of various docker containers

分類Dev

Multiple Docker containers, same image, different config

分類Dev

How to assign domain names to containers in Docker?

分類Dev

docker-compose up for only certain containers

分類Dev

Multiple Docker containers, same image, different config

分類Dev

Multiple Docker containers, same image, different config

分類Dev

Efficiently using multiple docker containers in a single host

分類Dev

Start Docker Containers In Specific Order After Reboot

分類Dev

Is it possible to launch privileged docker containers on Amazon elasticbeanstalk?

分類Dev

How to use local docker containers with Kubernetes

分類Dev

How to run docker containers in their network with an external gateway?

分類Dev

Connect to postgres in laravel using docker containers

分類Dev

Docker container DNS alias available in other containers

分類Dev

Link two docker containers on Windows 10

分類Dev

Communication between several php docker containers

分類Dev

How to cleanup docker containers and images on linux machines

分類Dev

Windows Server Core Docker Containers networking problem

分類Dev

Starting Docker containers with combined list for volumes with ansible

分類Dev

NGinx and multiple docker containers but one subdomain

分類Dev

permission denied in containers after moving docker home

分類Dev

Automatic provisioning of Open stack VM for Docker containers

分類Dev

Virtual serial port between docker containers

分類Dev

docker0、Docker Bridge Driver、Containersの関係

分類Dev

Docker Volume without linking. What is the use case?

分類Dev

Docker: Linking Spring Boot container with Mongo DB container

Related 関連記事

  1. 1

    Linking Docker Containers

  2. 2

    How to list containers in Docker

  3. 3

    Building Docker Containers in VSTS

  4. 4

    Docker compose linking appears to not work

  5. 5

    Log management of various docker containers

  6. 6

    Multiple Docker containers, same image, different config

  7. 7

    How to assign domain names to containers in Docker?

  8. 8

    docker-compose up for only certain containers

  9. 9

    Multiple Docker containers, same image, different config

  10. 10

    Multiple Docker containers, same image, different config

  11. 11

    Efficiently using multiple docker containers in a single host

  12. 12

    Start Docker Containers In Specific Order After Reboot

  13. 13

    Is it possible to launch privileged docker containers on Amazon elasticbeanstalk?

  14. 14

    How to use local docker containers with Kubernetes

  15. 15

    How to run docker containers in their network with an external gateway?

  16. 16

    Connect to postgres in laravel using docker containers

  17. 17

    Docker container DNS alias available in other containers

  18. 18

    Link two docker containers on Windows 10

  19. 19

    Communication between several php docker containers

  20. 20

    How to cleanup docker containers and images on linux machines

  21. 21

    Windows Server Core Docker Containers networking problem

  22. 22

    Starting Docker containers with combined list for volumes with ansible

  23. 23

    NGinx and multiple docker containers but one subdomain

  24. 24

    permission denied in containers after moving docker home

  25. 25

    Automatic provisioning of Open stack VM for Docker containers

  26. 26

    Virtual serial port between docker containers

  27. 27

    docker0、Docker Bridge Driver、Containersの関係

  28. 28

    Docker Volume without linking. What is the use case?

  29. 29

    Docker: Linking Spring Boot container with Mongo DB container

ホットタグ

アーカイブ