<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      Docker - 在Rocky Linux 9.4 上安裝Docker-CE


      安裝Docker-CE

      修改repo源

      修改為國內(nèi)阿里源以提高安裝速度

      sed -e 's|^mirrorlist=|#mirrorlist=|g' \
          -e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.aliyun.com/rockylinux|g' \
          -i.bak \
          /etc/yum.repos.d/rocky*.repo
      

      設(shè)置存儲(chǔ)庫

      dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
      

      安裝

      安裝docker-ce時(shí)會(huì)同步安裝containerd.io、docker-ce-cli、docker-buildx-plugin、docker-ce-rootless-extras和docker-compose-plugin。

      dnf install -y docker-ce
      

      此命令還會(huì)創(chuàng)建一個(gè) docker組,但默認(rèn)情況下不會(huì)向該組添加任何用戶。

      允許非root用戶運(yùn)行

      Docker 守護(hù)程序綁定到 Unix 套接字,而不是 TCP 端口。
      默認(rèn)情況下,用戶 root擁有 Unix 套接字,Docker守護(hù)程序始終以root用戶身份運(yùn)行,其他用戶只能使用sudo訪問。
      如果不想docker在命令前加上sudo,可以創(chuàng)建一個(gè)名為docker的Unix組并向其中添加普通用戶。

      usermod -aG docker anliven
      newgrp docker
      

      設(shè)置自啟動(dòng)并啟動(dòng)

      systemctl --now enable docker
      

      驗(yàn)證安裝

      下載運(yùn)行hello-world映像,容器運(yùn)行時(shí)會(huì)打印一條確認(rèn)消息并退出。

      docker run hello-world
      

      安裝過程示例

      [root@node200 ~]# uname -a
      Linux node200 5.14.0-427.33.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 28 17:34:59 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
      [root@node200 ~]# 
      [root@node200 ~]# cat /etc/system-release
      Rocky Linux release 9.4 (Blue Onyx)
      [root@node200 ~]# 
      [root@node200 ~]# dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
      Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
      [root@node200 ~]# 
      [root@node200 ~]# dnf install -y docker-ce
      Rocky Linux 9 - BaseOS                                                                                       1.8 MB/s | 2.3 MB     00:01    
      Rocky Linux 9 - AppStream                                                                                    4.4 MB/s | 8.0 MB     00:01    
      Rocky Linux 9 - Extras                                                                                        20 kB/s |  15 kB     00:00    
      Dependencies resolved.
      =============================================================================================================================================
       Package                                    Architecture            Version                          Repository                         Size
      =============================================================================================================================================
      Installing:
       docker-ce                                  x86_64                  3:27.2.0-1.el9                   docker-ce-stable                   27 M
      Installing dependencies:
       containerd.io                              x86_64                  1.7.21-3.1.el9                   docker-ce-stable                   43 M
       docker-ce-cli                              x86_64                  1:27.2.0-1.el9                   docker-ce-stable                  7.9 M
      Installing weak dependencies:
       docker-buildx-plugin                       x86_64                  0.16.2-1.el9                     docker-ce-stable                   14 M
       docker-ce-rootless-extras                  x86_64                  27.2.0-1.el9                     docker-ce-stable                  4.0 M
       docker-compose-plugin                      x86_64                  2.29.2-1.el9                     docker-ce-stable                   13 M
      
      Transaction Summary
      =============================================================================================================================================
      Install  6 Packages
      ......
      ......
      ......
      Installed:
        containerd.io-1.7.21-3.1.el9.x86_64      docker-buildx-plugin-0.16.2-1.el9.x86_64           docker-ce-3:27.2.0-1.el9.x86_64               
        docker-ce-cli-1:27.2.0-1.el9.x86_64      docker-ce-rootless-extras-27.2.0-1.el9.x86_64      docker-compose-plugin-2.29.2-1.el9.x86_64     
      
      Complete!
      [root@node200 ~]#
      [root@node200 ~]# usermod -aG docker anliven
      [root@node200 ~]# newgrp docker
      [root@node200 ~]#
      [root@node200 ~]# systemctl --now enable docker
      Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service.
      [root@node200 ~]#
      [root@node200 ~]# docker run hello-world
      Unable to find image 'hello-world:latest' locally
      latest: Pulling from library/hello-world
      c1ec31eb5944: Pull complete 
      Digest: sha256:53cc4d415d839c98be39331c948609b659ed725170ad2ca8eb36951288f81b75
      Status: Downloaded newer image for hello-world:latest
      
      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/
      
      [root@node200 ~]#   
      [root@node200 ~]# docker version
      Client: Docker Engine - Community
       Version:           27.2.0
       API version:       1.47
       Go version:        go1.21.13
       Git commit:        3ab4256
       Built:             Tue Aug 27 14:17:06 2024
       OS/Arch:           linux/amd64
       Context:           default
      
      Server: Docker Engine - Community
       Engine:
        Version:          27.2.0
        API version:      1.47 (minimum version 1.24)
        Go version:       go1.21.13
        Git commit:       3ab5c7d
        Built:            Tue Aug 27 14:15:14 2024
        OS/Arch:          linux/amd64
        Experimental:     false
       containerd:
        Version:          1.7.21
        GitCommit:        472731909fa34bd7bc9c087e4c27943f9835f111
       runc:
        Version:          1.1.13
        GitCommit:        v1.1.13-0-g58aa920
       docker-init:
        Version:          0.19.0
        GitCommit:        de40ad0
      [root@node200 ~]#
      [root@node200 ~]# docker info
      Client: Docker Engine - Community
       Version:    27.2.0
       Context:    default
       Debug Mode: false
       Plugins:
        buildx: Docker Buildx (Docker Inc.)
          Version:  v0.16.2
          Path:     /usr/libexec/docker/cli-plugins/docker-buildx
        compose: Docker Compose (Docker Inc.)
          Version:  v2.29.2
          Path:     /usr/libexec/docker/cli-plugins/docker-compose
      
      Server:
       Containers: 1
        Running: 0
        Paused: 0
        Stopped: 1
       Images: 1
       Server Version: 27.2.0
       Storage Driver: overlay2
        Backing Filesystem: xfs
        Supports d_type: true
        Using metacopy: false
        Native Overlay Diff: true
        userxattr: false
       Logging Driver: json-file
       Cgroup Driver: systemd
       Cgroup Version: 2
       Plugins:
        Volume: local
        Network: bridge host ipvlan macvlan null overlay
        Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
       Swarm: inactive
       Runtimes: io.containerd.runc.v2 runc
       Default Runtime: runc
       Init Binary: docker-init
       containerd version: 472731909fa34bd7bc9c087e4c27943f9835f111
       runc version: v1.1.13-0-g58aa920
       init version: de40ad0
       Security Options:
        seccomp
         Profile: builtin
        cgroupns
       Kernel Version: 5.14.0-427.33.1.el9_4.x86_64
       Operating System: Rocky Linux 9.4 (Blue Onyx)
       OSType: linux
       Architecture: x86_64
       CPUs: 2
       Total Memory: 7.506GiB
       Name: node200
       ID: 0ba20da2-13b0-4424-a09e-5fba22a975c3
       Docker Root Dir: /var/lib/docker
       Debug Mode: false
       Experimental: false
       Insecure Registries:
        127.0.0.0/8
       Live Restore Enabled: false
      [root@node200 ~]#
      [root@node200 ~]# docker compose version
      Docker Compose version v2.29.2
      [root@node200 ~]#   
      [root@node200 ~]# docker images
      REPOSITORY    TAG       IMAGE ID       CREATED         SIZE
      hello-world   latest    d2c94e258dcb   16 months ago   13.3kB
      [root@node200 ~]# 
      [root@node200 ~]# docker ps -a
      CONTAINER ID   IMAGE         COMMAND    CREATED              STATUS                          PORTS     NAMES
      8c9ba6bc04b1   hello-world   "/hello"   About a minute ago   Exited (0) About a minute ago             unruffled_driscoll
      [root@node200 ~]# 
      

      配置daemon.json

      • daemon.json是Docker守護(hù)進(jìn)程配置文件
      • 配置 Docker 下載加速器地址
      • 根據(jù)需要配置相關(guān)參數(shù)
      cat > /etc/docker/daemon.json << EOF
      {
        "registry-mirrors": ["https://dockerpull.com"]
      }
      EOF
      systemctl daemon-reload
      

      參考信息


      posted @ 2024-09-05 22:51  Anliven  閱讀(1771)  評(píng)論(0)    收藏  舉報(bào)
      主站蜘蛛池模板: 保靖县| 国产专区一线二线三线码| 免费人成在线观看网站| 欧美成人看片黄A免费看| 阳谷县| 天天躁夜夜躁狠狠喷水| 中文字幕精品亚洲无线码二区| 少妇太爽了在线观看免费视频 | 亚洲乱理伦片在线观看中字| 国内精品久久毛片一区二区| 午夜免费无码福利视频麻豆| 亚洲精品国产一二三区| 性欧美vr高清极品| 襄樊市| 伊在人间香蕉最新视频| 亚洲天堂伊人久久a成人| 又黄又爽又色的少妇毛片| 精品国产一区二区三区蜜臀| www国产亚洲精品久久网站| 欧美极品色午夜在线视频| 日韩高清视频 一区二区| 97香蕉碰碰人妻国产欧美| 亚洲国产精品日韩av专区| 亚洲国产中文字幕精品| 国产精品黄在线观看免费| 国产精品白浆免费视频| 97在线观看视频免费| 久久丁香五月天综合网| 亚洲男人天堂东京热加勒比| 边添小泬边狠狠躁视频| 亚洲精品区午夜亚洲精品区| 日本一卡2卡3卡四卡精品网站| 鲁一鲁一鲁一鲁一澡| 国产另类ts人妖一区二区| 116美女极品a级毛片| 夜夜高潮次次欢爽av女| 久久99国产精品久久99| 中文字幕日韩精品有码| 亚洲成a人片在线观看中| 国产成人无码aa精品一区| 韩国无码AV片午夜福利|