日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

docker虚拟化容器技术

發布時間:2024/3/13 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 docker虚拟化容器技术 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

docker虛擬化容器技術

  • 1、安裝
  • 2、查看docker服務
  • 3、卸載
  • 4、幫助命令
  • 5、鏡像命令

1、安裝

#安裝方式一 curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun#安裝方法二 sudo apt remove docker docker-engine docker.io containerd runc sudo apt update sudo apt install apt-transport-https ca-certificates curl gnupg lsb-release sudo apt install docker-ce docker-ce-cli containerd.iosudo snap install docker # version 20.10.8, or sudo apt install docker.io # version 20.10.7-0ubuntu1~20.04.2

2、查看docker服務

$ docker --version $ docker version $ sudo systemctl status docker $ sudo service docker status restart stop enable disable

3、卸載

sudo apt remove docker docker-engine docker.io containerd runc sudo apt autoremove docker-ce-* sudo rm -rf /etc/systemd/system/docker.service.d sudo rm -rf /var/lib/docker

或者

sudo systemctl disable docker /lib/systemd/systemd-sysv-install disable docker sudo find / -name docker.service | xargs sudo rm -rf sudo find / -name docker.service sudo rm /etc/init.d/docker sudo systemctl daemon-reloadsudo service docker status

或者

webrx@us:/etc/init.d$ sudo systemctl daemon-reload webrx@us:/etc/init.d$ sudo rm /etc/init.d/docker webrx@us:/etc/init.d$ sudo systemctl daemon-reload webrx@us:/etc/init.d$ sudo systemctl status docker Unit docker.service could not be found. webrx@us:/etc/init.d$ sudo service docker status Unit docker.service could not be found. webrx@us:/etc/init.d$

4、幫助命令

$ docker version $ docker --version $ info $ docker 命令 --help $ docker pull --help $ docker 回車查看所有命令信息

5、鏡像命令

#1 查看本地鏡像,沒有鏡像 webrx@us:~$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE#2 從官方hub.docker.com接取一個hello-world鏡像案例 webrx@us:~$ docker pull hello-world Using default tag: latest latest: Pulling from library/hello-world 2db29710123e: Pull complete Digest: sha256:37a0b92b08d4919615c3ee023f7ddb068d12b8387475d64c622ac30f45c29c51 Status: Downloaded newer image for hello-world:latest docker.io/library/hello-world:latest#3 再查看鏡像 docker images docker images -q docker images -aqwebrx@us:~$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE hello-world latest feb5d9fea6a5 4 weeks ago 13.3kB#4 運行hello-world鏡像 webrx@us:~$ 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 theexecutable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, which sent itto 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 ID:https://hub.docker.com/For more examples and ideas, visit:https://docs.docker.com/get-started/#5 搜索鏡像 docker search mysql docker search webrxdocker search --limit 35 --no-trunc centosdocker pull mysql 拉取NAME: 鏡像倉庫源的名稱DESCRIPTION: 鏡像的描述OFFICAL: 是否docker官方發布stars: 類似Github里面的star,表示點贊、喜歡的意思AUTOMATED: 自動構建#6 刪除鏡像 docker rmi -f 鏡像ID

總結

以上是生活随笔為你收集整理的docker虚拟化容器技术的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。