Skip to content

Remove some unused packages #1324

Closed
Closed
@hydrargyrum

Description

@hydrargyrum

(This is a follow-up of monicahq/docker#109)

I see in a Dockerfile some effort is made to remove unused packages. But inspecting the resulting image, some packages seem questionable for a production image, for example autoconf, make, curl (command-line tool), dpkg-dev, gcc.
Those would be acceptable for an build-stage image where only required stuff would be installed/copied in the production-stage image. Furthermore, cleaning unused packages from a build-stage image would be pointless, so the apt-mark part would not even be needed.

% docker run --rm --entrypoint /bin/sh -it php:8.1-fpm -c "apt-mark showmanual"
autoconf
ca-certificates
curl
dpkg-dev
file
g++
gcc
libargon2-1
libbrotli1
libc6
libc6-dev
libcom-err2
libcurl4
libffi7
libgcc-s1
libgcrypt20
libgmp10
libgnutls30
libgpg-error0
libgssapi-krb5-2
libhogweed6
libicu67
libidn2-0
libk5crypto3
libkeyutils1
libkrb5-3
libkrb5support0
libldap-2.4-2
liblzma5
libnettle8
libnghttp2-14
libonig5
libp11-kit0
libpsl5
libreadline8
librtmp1
libsasl2-2
libsodium23
libsqlite3-0
libssh2-1
libssl1.1
libstdc++6
libtasn1-6
libtinfo6
libunistring2
libxml2
make
pkg-config
re2c
xz-utils
zlib1g

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions