Make sure the dev docker image is not using root user - #43
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR attempts to address security concerns by making the development Docker image run as a non-root user instead of root. It adds build arguments for user/group configuration in docker-compose.yml and updates Dockerfile.dev to accept these arguments and switch to a non-root user.
Key Changes:
- Added build arguments (APP_USER, APP_GROUP, UID, GID) to docker-compose.yml for the dev service
- Declared corresponding ARG variables in Dockerfile.dev
- Added USER directive to switch from root to the non-root user
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docker-compose.yml | Defines build arguments for user/group configuration (UID=1000, GID=1000) |
| Dockerfile.dev | Declares ARG variables and adds USER directive to switch to non-root user |
Critical Issues Found:
The implementation is incomplete and will cause the Docker build to fail. The user and group referenced in the USER directive are never created, and file ownership is not properly configured. See the detailed comments for required fixes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Resolves #41