Tags: openfaas/python-flask-template
Tags
feat: user multi-stage builds and remove apt and pip caches 1. Remove apt cache after running `apt-get` 2. Pass `--no-cache-dir` to the `pip` command 3. Use multi-stage builds to remove the test layers from the final image. Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
feat: use chown during copy to reduce image size and build time Using the `--chown` flag during `COPY` is much faster than running `chown -R`. It also removes a layer from the image, resulting in faster and smaller builds. Resolves #55 Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
Remove armhf templates and move to multi-arch / buildx Migrate as per the python3 template in the classic Go templates, where a separate -armhf/-arm64 template is not required and TARGETPLATFORM is introduced for use with buildkit / buildx and faas-cli publish. Tested with an RPi with a 32-bit OS and with a 64-bit ARM OS (Ubuntu 20.04). Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>