Docker安裝和簡單使用入門教程
安裝
由于我本人使用的linux系統(tǒng),原生支持docker,相對安裝還是比較簡單的
1:使用下面的官方腳本安裝:
wget -qO- https://get.docker.com/ | sh
2:輸入下面的命令驗證是否可以查看版本號,可以就是安裝成功
sudo docker version
3:建議把當前使用的用戶加到Docker用戶組,就可以不用很次都sudo了
sudo usermod -aG docker your_username
4:重新登錄,sudo權(quán)限才會成效
logout
至此,你的docker環(huán)境就已經(jīng)很快的安裝完了
簡單使用
一切從hello world開始,如下命令
docker run hello-world
你大致會看到如下內(nèi)容
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. 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://cloud.docker.com/ For more examples and ideas, visit: https://docs.docker.com/engine/userguide/
現(xiàn)在就開始開始自己的docker學習之旅吧!
以上所述是小編給大家介紹的Docker安裝和簡單使用入門教程,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!
相關(guān)文章
docker容器狀態(tài)轉(zhuǎn)換管理命令實例詳解
Docker容器只是一個運行于宿主操作系統(tǒng)host?OS上的應用進程,所以你需要一個鏡像來運行它,Docker鏡像以進程的方式運行時就叫做Docker容器,這篇文章主要給大家介紹了關(guān)于docker容器狀態(tài)轉(zhuǎn)換管理命令的相關(guān)資料,需要的朋友可以參考下2022-05-05
使用docker創(chuàng)建和運行跨平臺的容器化mssql數(shù)據(jù)庫
這篇文章主要介紹了使用docker創(chuàng)建和運行跨平臺的容器化的mssql數(shù)據(jù)庫,本章介紹了在window10專業(yè)版下如何利用docker創(chuàng)建mssql數(shù)據(jù)庫,需要的朋友可以參考下2022-05-05
關(guān)于構(gòu)建aarch64環(huán)境Mysql8.0的Docker鏡像問題
這篇文章主要介紹了構(gòu)建aarch64環(huán)境Mysql8.0的Docker鏡像,需要的朋友可以參考下2022-04-04
Mac系統(tǒng)上用Docker搭建lamp環(huán)境
這篇文章主要給大家介紹了Mac系統(tǒng)上用Docker如何搭建lamp環(huán)境,文章給大家介紹的很詳細,有需要的朋友們可以參考借鑒,下面來一起看看吧。2016-12-12

