Skip to content

Conversation

@AbijahKaj
Copy link

This pull request improves the Dockerfile build process by optimizing file ownership handling and enhancing security. The main changes focus on setting file ownership during the copy steps and reducing the need for later permission adjustments (which usually take around 100 seconds in my tests, now this is reduced to near 0.5 seconds).

Dockerfile improvements:

  • Used --chown=appuser:appuser during COPY commands to set file ownership immediately, reducing the need for separate chown commands and improving build speed.
  • Switched to the appuser user before installing Python dependencies to avoid post-installation permission fixes.
  • Adjusted the order of USER commands to ensure files are copied and owned correctly, then switched back to a non-privileged user for security.

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