Docker挂载/tmp目录报错:failed to create OCI runtime console socket: mkdir /tmp/pty891989927: permission

docker: Error response from daemon: failed to create OCI runtime console socket: mkdir /tmp/pty891989927: permission denied: unknown.

错误原因:

/tmp 权限不够

解决办法:

chmod 777 /tmp

若出现:chmod: changing permissions of ‘/tmp’: Operation not permitted

# 查看/tmp 是否被锁
lsattr
# 会出现
----ia-------e-- ./tmp
# 解决
sudo chattr -ia /tmp
# 再修改权限
sudo chmod 777 /tmp

docker 容器成功启动

你可能感兴趣的:(Docker,JavaEE,Bug,docker,linux)