What does the DOCKER_HOST variable do?

后端 未结 3 587
鱼传尺愫
鱼传尺愫 2021-01-30 02:14

I\'m new to Docker, using Boot2Docker on OSX. After booting it, this message is given:

To connect the Docker client to the Docker daemon, please set
export DOCKE         


        
3条回答
  •  有刺的猬
    2021-01-30 02:40

    It points to the docker host! I followed these steps:

    $ boot2docker start
    
    Waiting for VM and Docker daemon to start...
    ..............................
    Started.
    
    To connect the Docker client to the Docker daemon, please set:
        export DOCKER_HOST=tcp://192.168.59.103:2375
    
    $ export DOCKER_HOST=tcp://192.168.59.103:2375
    
    $ docker run ubuntu:14.04 /bin/echo 'Hello world'
    Unable to find image 'ubuntu:14.04' locally
    Pulling repository ubuntu
    9cbaf023786c: Download complete 
    511136ea3c5a: Download complete 
    97fd97495e49: Download complete 
    2dcbbf65536c: Download complete 
    6a459d727ebb: Download complete 
    8f321fc43180: Download complete 
    03db2b23cf03: Download complete 
    Hello world
    

    See:
    http://docs.docker.com/userguide/dockerizing/

提交回复
热议问题