Docker Community Forums

Share and learn in the Docker community.

Apk packages to include in image

Is there a set of basic or desired apk packages to include in all alpine images as a base?

That is, when building an image should there be a set of packages to include in every image. Below is an example of an image.

   FROM alpine-3.13.5

   RUN apk add --no-cache --virtual build_deps \
                        zlib \
                        xv-dev \
                        musl-dev \
                    && apk del build_deps \
                    && rm -rf /var/cache/apk/* /root/.wget-hsts /root/.[acpw]*

Thank you :slight_smile:

If the answer would be “yes”, then wouldn’t those be included in the base image?

They would be included as virtual build-deps when the image is built, but then removed to minimize the image cache. Or is there a better approach? Thank you :).