kernel 問題更新

  1. 查看目前沒有任何的 images。
    [root@kvm7 ~]# docker-current images 
    REPOSITORY      TAG         IMAGE ID        CREATED         SIZE
    
  2. 先校時,以免下載 docker image 出現認證過期的問題。
    [root@kvm7 ~]# chronyc -a makestep
    200 OK
    200 OK
    
  3. 下載 CentOS 最新版本的 docker image。
    [root@kvm7 ~]# docker pull centos
    Using default tag: latest
    Trying to pull repository docker.io/library/centos ... 
    latest: Pulling from docker.io/library/centos
    5e35d10a3eba: Pull complete 
    Digest: sha256:dcbc4e5e7052ea2306eed59563da1fec09196f2ecacbe042acbdcd2b44b05270
    Status: Downloaded newer image for docker.io/centos:latest
    
  4. 再查詢出現 centos。
    [root@kvm7 ~]# docker-current images 
    REPOSITORY          TAG        IMAGE ID         CREATED         SIZE
    docker.io/centos    latest     2d194b392dd1     11 days ago     195 MB
    
  5. 使用 centos:latest 映像檔,建立一個容器執行 /bin/bash,如果沒有更新核心會出現以下錯誤。
    [root@kvm7 ~]# docker-current run -ti centos:latest /bin/bash
    docker-current: Error response from daemon: error creating overlay mount to 
    /var/lib/docker/overlay2/f5ffbdf709b37fe25d9c668e8759c6a0e2ff083e9cfa6be4af
    8b331f84e3cc5f/merged: invalid argument.
    See 'docker-current run --help'.
    
  6. 更新核心後重新啟動。
    [root@kvm7 ~]# yum update kernel-*
    [root@kvm7 ~]# reboot
    
  7. 使用 centos:latest 映像檔,建立一個容器執行 /bin/bash。
    [root@kvm7 ~]# docker-current run -ti centos:latest /bin/bash
    [root@ada81d3faf18 /]#