Docker實戰(一) Docker安裝與基礎命令

2021-07-16 06:25:33 字數 1356 閱讀 1344

我是在ubuntu 16上安裝的docker,linux安裝docker只需要乙個命令:

sudo apt-get install docker.io

執行完後,可以在終端輸入docker看到以下資訊證明我們安裝成功了

注:提示許可權問題就新增sudo

docker

usage: docker [options] command [arg…]

docker daemon [ –help | … ]

docker [ –help | -v | –version ]

a self-sufficient runtime for containers.

options:

–config=~/.docker location of client config files

-d, –debug enable debug mode

-h, –host= daemon socket(s) to connect to

-h, –help print usage

-l, –log-level=info set the logging level

–tls use tls; implied by –tlsverify

–tlscacert=~/.docker/ca.pem trust certs signed only by this ca

–tlscert=~/.docker/cert.pem path to tls certificate file

–tlskey=~/.docker/key.pem path to tls key file

–tlsverify use tls and verify the remote

-v, –version print version information and quit

run 『docker command –help』 for more information on a command.

安裝完以後,也可執行以下命令檢視版本資訊:

docker -v

docker version

docker info

當利用 docker run 來建立容器時,docker 在後台執行的標準操作包括:

利用映象建立並啟動乙個容器

分配乙個檔案系統,並在唯讀的映象層外面掛載一層可讀寫層

從宿主主機配置的網橋介面中橋接乙個虛擬介面到容器中去

從位址池配置乙個 ip 位址給容器

執行使用者指定的應用程式

執行完畢後容器被終止

Docker實戰(一) Docker基礎命令

下面簡單介紹一下docker常用的一些基礎命令 在ubuntu中安裝docker sudo apt get install docker.io 檢視docker的版本資訊 docker version 檢視安裝docker的資訊 docker info 檢視本機docker中存在哪些映象 docke...

Docker實戰(一) Docker基礎命令

下面簡單介紹一下docker常用的一些基礎命令 在ubuntu中安裝docker sudo apt get install docker.io 檢視docker的版本資訊 docker version 檢視安裝docker的資訊 docker info 檢視本機docker中存在哪些映象 docke...

安裝docker 實戰一

一 安裝docker 1 docker 要求 centos 系統的核心版本高於 3.10 檢視本頁面的前提條件來驗證你的centos 版本是否支援 docker 通過 uname r 命令檢視你當前的核心版本 uname r2 使用 root 許可權登入 centos。確保 yum 包更新到最新。y...