手册
目录
收藏818
分享
阅读36225
更新时间2022-04-11
Docker 支持以下的 Ubuntu 版本:
Ubuntu Precise 12.04 (LTS)
Ubuntu Trusty 14.04 (LTS)
Ubuntu Wily 15.10
其他更新的版本……
Docker 要求 Ubuntu 系统的内核版本高于 3.10 ,查看本页面的前提条件来验证你的 Ubuntu 版本是否支持 Docker。
通过 uname -r 命令查看你当前的内核版本
php@php:~$ uname -r

php@php:~$ wget -qO- https://get.docker.com/ | sh

输入当前用户的密码后,就会下载脚本并且安装Docker及依赖包。


安装完成后有个提示:
If you would like to use Docker as a non-root user, you should now consider adding your user to the "docker" group with something like: sudo usermod -aG docker php Remember that you will have to log out and back in for this to take effect!
当要以非root用户可以直接运行docker时,需要执行 sudo usermod -aG docker php 命令,然后重新登陆,否则会有如下报错

php@php:~$ sudo service docker start

3、测试运行hello-world
php@php:~$ docker run hello-world
相关
视频
RELATED VIDEOS
科技资讯
1
2
3
4
5
6
7
8
9
精选课程
共5课时
17.2万人学习
共49课时
77.2万人学习
共29课时
61.8万人学习
共25课时
39.4万人学习
共43课时
71.1万人学习
共25课时
61.7万人学习
共22课时
23万人学习
共28课时
34万人学习
共89课时
125.4万人学习