Refine Dockerfiles#250
Conversation
MarkKoz
left a comment
There was a problem hiding this comment.
Looks good. None of the Python dependencies need to be built with GCC, right?
|
Correct, it was only uwsgi. I was sure to actually run the resulting containers to ensure things still worked just in case I was mistaken beforehand. |
|
I think doing |
d2e1b65 to
9ce9b95
Compare
|
@MarkKoz Added the env vars suggested. It hasn't impacted Edit: I looked at wrong image details for size. It dropped to 440.2MB 🎉 |
|
It's 440 MB if the cache is disabled, 466 MB if it is enabled. Are you sure you built the right Dockerfile when testing that? I noticed you only set those environment variables for |
|
Yep, built the correct one, but just didn't look at the right image when checking the size. You're right, it's decreased again, which is great news. I'll add them to the other container also. |
|
Thanks! |
I've done some refinement for the Dockerfiles. This has resulted in the following improvements:
Change Details
Dockerfile.localhas been changed tolocal.Dockerfilefor better filetype detection.Changed from interactive
addusercommand that resulted in logged warnings to the non-interactiveuseraddcommand.--systemmakes it a homeless non-login user.--shellhas been set to avoid possible security issues.uwsgiis now installed from the system package repository, as it is already built and actively updated, using the exact same version we did.install_packagesis used instead ofapt-getas it does cleanup, handles any prompts and doesn't install recommends automatically.COPYfor Pipfiles and project files are now done at the same time.RUNcommands have been tidied to use shorter references as the entrypoints are confirmed to be for the same locations.pipenvinstall has been moved to sameRUNassetuptools