Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve size, security, and usability of the Dockerfile.
This improves a few things about the Dockerfile: 1. Size Caches are forgone, less bytecode is cached from build steps, less is copied from the build context, and the final application is stored in a zip. A build arg has also been added to keep the spun-up containers smaller by optionally suppressing writing bytecode files at runtime. 2. Security `.env` files (and anything else sitting around with the build context) are never committed to any layer of a container image. The new `.dockerignore` prevents many such files from even being visible during the build process. 3. Usability The base image is now a fixed version of Python officially tested for compatibility with Discord Autodelete, so the build process will remain more stable over time. The container's `CMD` has been replaced with an `ENTRYPOINT` so that arguments can easily be passed to it at runtime. And, finally, code comments have been added to explain the role of the Dockerfile in the context of this repository.
- Loading branch information