Docker使用非root用户
来源:互联网 发布:教散打的软件 编辑:程序博客网 时间:2024/06/06 15:40
Docker使用非root用户
通常我们使用Docker的时候都是使用的root,官方说法如下:
The docker daemon binds to a Unix socket instead of a TCP port. By default that Unix socket is owned by the user root and other users can access it with sudo. For this reason, docker daemon always runs as the root user.
To avoid having to use sudo when you use the docker command, create a Unix group called docker and add users to it. When the docker daemon starts, it makes the ownership of the Unix socket read/writable by the docker group.
下面是使用非root用户操作的步骤
创建docker组
sudo groupadd docker
将当前用户加入docker组
sudo gpasswd -a ${USER} docker
重新启动docker服务(下面是CentOS7的命令)
sudo systemctl restart docker
当前用户退出系统重新登陆
运行docker命令
docker ps
转载请以链接形式标明本文链接
本文链接:http://blog.csdn.net/kongxx/article/details/52413332
2 0
- Docker使用非root用户
- 非root用户使用docker
- Docker使用非root用户
- 非root用户登录docker
- 非root用户运行docker
- 在docker容器中使用非root用户执行脚本
- docker默认存放以及docker 非root用户
- Docker安全--关于Docker使用root与非root用户的场景中的容器与host中的执行用户的研究
- Docker配置非root用户执行客户端命令
- ubuntu12+ 非root用户使用串口
- Linux下非root用户使用串口
- 【Docker】非root用户加入docker用户组省去sudo (三)
- APACHE 非ROOT用户
- 如何进入docker 使用root用户的方式
- 非root用户安装 Python + MySQLdb 及使用
- 让非root用户能使用wireshark捕捉网络数据包
- Linux 下Tomcat非root用户不能使用80端口
- Linux非root用户如何使用80端口启动程序
- ios 启动图尺寸 及icon尺寸
- react
- php的api数据接口书写实例
- Android FFmpeg 视频信息获取及压缩
- SQL Server Profiler使用教程
- Docker使用非root用户
- java多线程和并发性介绍
- cookie入门介绍
- JS内错误提示
- 单链表的翻转
- iOS--文件下载
- android 画虚线,虚线不能正常显示问题
- AndroidStudio使用总结备忘
- Ionic