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

Prevent Docker from running commands as root user #696

Closed
XzAeRo opened this issue May 28, 2019 · 0 comments
Closed

Prevent Docker from running commands as root user #696

XzAeRo opened this issue May 28, 2019 · 0 comments

Comments

@XzAeRo
Copy link
Member

XzAeRo commented May 28, 2019

Docker runs all commands as root user. This is a huge security issue, and should be avoided.

To fix it, we can modify the Dockerfiles to a format like this:

# run here all commands related to system wide installations, such as pecl packages.

# setup non-root user
RUN useradd --create-home appuser
WORKDIR /home/appuser
USER appuser

# run the rest of the commands as usual but without root access
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant