Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Dockerfile to mitigate vulnerabilities, reduce image size, and…
… upgrade Python version - Changed the base image from python:3.11.6-alpine3.18 to alpine:3.20.1 due to multiple critical vulnerabilities found in almost all recent versions of python:alpine images. - Implemented a multi-stage build to ensure that only essential parts of Python are included by compiling Python source files into optimized bytecode and removing the original source files and unnecessary directories, which significantly reduces the final image size. - Upgraded Python version from 3.11 to 3.12 for improved performance and security enhancements. - Simplified the build process by using ARG for Python version, enabling easier future updates.
- Loading branch information