Improve the Dockerfile to remove unnecessary packages and do some cleanup. This will reduce the current image size by over 300mb.
$ podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
quay.io/tchughesiv/feature-server 0.41.3 84dc7acaad64 2 minutes ago 1.04 GB
docker.io/feastdev/feature-server 0.41.3 1bbf34c192d9 3 weeks ago 1.37 GB
This is done by switching to the official python3 debian 11 slim image (python:3.11-slim-bullseye) which handles some of cleanup around python installation. We also tell pip install not to use cache and remove the build-essential package. Finally, we do some additional cleanup around apt.
Additionally, this PR fixes Dockerfile.dev so that it builds local dev changes into a functional container image, as was its intent.
What this PR does / why we need it:
Improve the Dockerfile to remove unnecessary packages and do some cleanup. This will reduce the current image size by over 300mb.
This is done by switching to the official python3 debian 11 slim image (
python:3.11-slim-bullseye
) which handles some of cleanup around python installation. We also tell pip install not to use cache and remove thebuild-essential
package. Finally, we do some additional cleanup around apt.Additionally, this PR fixes
Dockerfile.dev
so that it builds local dev changes into a functional container image, as was its intent.Which issue(s) this PR fixes:
Fixes https://github.com/feast-dev/feast/issues/4784