使用 docker run
直接運行 CentOS 7
鏡像,並登錄 bash
。
C:\Users\yhu>docker run -it centos:centos7 bash
Unable to find image 'centos:centos7' locally
centos7: Pulling from library/centos
2d473b07cdd5: Pull complete
Digest: sha256:be65f488b7764ad3638f236b7b515b3678369a5124c47b8d32916d6487418ea4
Status: Downloaded newer image for centos:centos7
[root@3ceb808f5a6c /]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
[root@3ceb808f5a6c /]#
從鏡像的發佈日期來看,CentOS 的版本已經有多年沒有更新了。
對於操作系統來看,這可能會導致很多潛在的安全性問題。
針對上面的情況,不建議在服務器生產環境中繼續使用了。