Skip to content

enh: Add dev tools and fix permissions#3

Merged
nfebe merged 1 commit into
mainfrom
enh/dev-tools-and-permissions
Mar 8, 2026
Merged

enh: Add dev tools and fix permissions#3
nfebe merged 1 commit into
mainfrom
enh/dev-tools-and-permissions

Conversation

@nfebe

@nfebe nfebe commented Mar 8, 2026

Copy link
Copy Markdown
Contributor
  • Add essential dev tools: sudo, vim, nano, wget, htop, jq, etc
  • Add network debugging tools: netcat, telnet, ping
  • Add build tools: build-essential, rsync
  • Configure GD with full support: freetype, jpeg, webp
  • Fix /var/www ownership for www-data user
  • Pre-create .composer cache directory with correct permissions
  • Configure git safe.directory to allow any directory

Fixes permission issues where www-data couldn't write to /var/www for Composer cache and git config.

- Add essential dev tools: sudo, vim, nano, wget, htop, jq, etc
- Add network debugging tools: netcat, telnet, ping
- Add build tools: build-essential, rsync
- Configure GD with full support: freetype, jpeg, webp
- Fix /var/www ownership for www-data user
- Pre-create .composer cache directory with correct permissions
- Configure git safe.directory to allow any directory

Fixes permission issues where www-data couldn't write to /var/www
for Composer cache and git config.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
@sourceant

sourceant Bot commented Mar 8, 2026

Copy link
Copy Markdown

Code Review Summary

The PR adds a comprehensive suite of development and debugging tools to the Docker environment and addresses common permission issues with Composer and Git.

🚀 Key Improvements

  • Full GD library support (WebP, JPEG, Freetype).
  • Automated configuration of Git safe directory for the web user.
  • Proper pre-creation of Composer cache directories to avoid permission denied errors.

💡 Minor Suggestions

  • Review the necessity of build-essential in the final image layer.
  • Narrow the scope of git safe.directory from '*' to the specific project root.

@sourceant sourceant Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review complete. See the overview comment for a summary.

Comment thread Dockerfile
nginx \
git \
curl \
sudo \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding debugging and build tools (sudo, vim, build-essential, etc.) significantly increases the image size and security risk. Consider moving these to a multi-stage build or a separate 'dev' target if this image is intended for production.

Suggested change
sudo \
+ # Consider moving dev tools to a separate build stage

@nfebe nfebe merged commit 9a4ba5a into main Mar 8, 2026
5 checks passed
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.

1 participant