Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用非root用户运行hyperf #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

liutaot
Copy link

@liutaot liutaot commented Apr 20, 2023

No description provided.

@limingxinleo
Copy link
Member

docker 里不需要这么做了吧

@liutaot
Copy link
Author

liutaot commented Apr 21, 2023

docker 里不需要这么做了吧

从安全和最佳实践角度考虑,即使在最新版本的Docker中,仍然建议在Dockerfile中创建非root用户运行容器。这可以最大程度地减少在容器内部发生安全漏洞的风险,因为非root用户在容器内部具有更少的权限,即使容器被攻击,攻击者也只能以非root用户的权限运行恶意代码,不会对宿主机造成太大的危害。

只是看下要不要把创建用户的操作放在基础镜像。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants