Docker有兩個版本:python
- 社區版(CE)
- 企業版(EE)
Docker Community Edition(CE)很是適合但願開始使用Docker並嘗試使用基於容器的應用程序的我的開發人員和小型團隊。docker
Docker Enterprise Edition(EE)專爲企業開發和IT團隊而設計,他們在生產中大規模構建,發佈和運行業務關鍵型應用程序。json
Windows環境:ubuntu
下載docker安裝包,下載地址 :https://hub.docker.com/editions/community/docker-ce-desktop-windowswindows
Linux環境:bash
如何測試docker是否安裝成功?app
安裝完成後,你能夠經過一下命令檢測docker是否安裝成功。ide
docker --version Docker version 18.09.7, build 2d0083d
查看安裝docker的版本學習
查看更多詳細信息能夠經過一下命令測試
#docker info Containers: 11 Running: 0 Paused: 0 Stopped: 11 Images: 23 Server Version: 18.09.7 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: false Logging Driver: json-file Cgroup Driver: cgroupfs ...
您能夠運行一個hello-world鏡像來測試您的docker是否正確安裝
#docker run hello-world Hello 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. (amd64) 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 bash Share images, automate workflows, and more with a free Docker ID: https://hub.docker.com/ For more examples and ideas, visit: https://docs.docker.com/get-started/
您會看到以上的錯誤輸出,是由於您在本地沒有hello-world鏡像。
經過docker image ls 來查看您本地安裝的docker鏡像列表
#docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE <none> <none> 5152621ce494 11 days ago 131MB friendlyhello latest 6d2fbf72df16 11 days ago 131MB ***/**** part1 6d2fbf72df16 11 days ago 131MB <none> <none> 85e012f54e30 11 days ago 131MB <none> <none> 969ae6bada07 11 days ago 131MB python 2.7-slim ca96bab3e2aa 4 weeks ago 120MB hello-world latest fce289e99eb9 6 months ago 1.84kB
以上就是docker的安裝及測試,下一章將學習製做docker鏡像。