在Windows系統下安裝docker視窗的配置過程_docker

來源:互聯網
上載者:User

前言

目前對docker支援最好的是Ubuntu系統,docker不支援在windows上運行,必須藉助docker-machine。docker提供了toolbox用於在windows和mac平台安裝docker。

工具箱包括:

      docker machine

      Docker Engine

      Kitematic

      docker命令列運行環境

      Oracle VM VirtualBox

安裝之前需要檢查BIOS中虛擬化的設定是否已開啟,參考此頁面

1、下載安裝檔案

https://www.docker.com/toolbox

2、雙擊安裝檔案進行安裝

3、運行docker run hello-world

運行時出現下面的問題

Post http://127.0.0.1:2375/v1.20/containers/create: dial tcp 127.0.0.1:2375: ConnectEx tcp: No connection could be made because the target machine actively refused it.. * Are you trying to connect to a TLS-enabled daemon without TLS? * Is your docker daemon up and running?

如下解決:

docker-machine regenerate-certs defaultdocker-machine restart default

顯示環境變數:

 $ docker-machine env default --shell sh  export DOCKER_TLS_VERIFY="1"  export DOCKER_HOST="tcp://192.168.99.100:2376"  export DOCKER_CERT_PATH="C:\Users\apex\.docker\machine\machines\default"  export DOCKER_MACHINE_NAME="default"  # Run this command to configure your shell:  # eval "$(E:\04_Program Files\docker_toolbox\Docker Toolbox\docker-machine.exe env default)"

設定環境變數:

eval "$(docker-machine env default --shell sh)"

再次運行:

$ docker run hello-worldUnable to find image 'hello-world:latest' locallyPulling repository docker.io/library/hello-worldaf340544ed62: Pulling image (latest) from docker.io/library/hello-worldaf340544ed62: Pulling image (latest) from docker.io/library/hello-world, endpoint: https://registry-1.docker.io/v1/af340544ed62: Pulling dependent layers535020c3e8ad: Pulling metadata535020c3e8ad: Pulling fs layer535020c3e8ad: Download completeaf340544ed62: Pulling metadataaf340544ed62: Pulling fs layeraf340544ed62: Download completeaf340544ed62: Download completeStatus: Downloaded newer image for hello-world:latestHello from Docker.This message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bashShare images, automate workflows, and more with a free Docker Hub account: https://hub.docker.comFor more examples and ideas, visit: https://docs.docker.com/userguide/

配置加速器:

docker-machine ssh defaultsudo sed -i "s|EXTRA_ARGS='|EXTRA_ARGS='--registry-mirror=http://efa65984.m.daocloud.io |g" /var/lib/boot2docker/profileexitdocker-machine restart default

注意

docker使用者的密碼是tcuser

可用於winscp傳輸檔案

總結

以上就是在Windows系統上安裝docker視窗的配置過程,文中給出了詳細的步驟介紹,希望對大家的學習或者工作帶來一定的協助,如果有疑問大家可以留言交流。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.