查看容器内部执行状态
docker run –privileged –name Myredis -v /var/lib/redis-data:/data -P –rm redis bash查看容器编排 配置
docker inspect 1fb7b6c8c0d0查看容器执行的log
docker logs 1fb7b6c8c0d0后台运行 -d
随机映射端口 -P 指定映射端口 -p 8080:80
Centos创建sudo用户并且免输sudo密码
sudo vim /etc/sudoers
找到#user privilege 的这一行,照着下面root的模式,复制一行将root改为自己的用户名,
并添加NOPASSWD:ALL。
root ALL=(ALL) ALL
test ALL=(ALL) NOPASSWD:ALL
重新以test登陆,执行sudo的时候就ok了。Selinux 权限问题 ## docker mariadb /mariadb/”>https://hub.docker.com//mariadb/
Note that users on host systems with SELinux enabled may see issues with this. The current workaround is to assign the relevant SELinux policy type to the new data directory so that the container will be allowed to access it:
$ chcon -Rt svirt_sandbox_file_t /my/own/datadir
docker container 调试
最新推荐文章于 2024-06-23 13:51:28 发布