Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change: Use --no-install-recommends for Debian/Ubuntu to reduce image size. #64

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

cfi-gb
Copy link
Member

@cfi-gb cfi-gb commented Nov 11, 2024

What

https://packages.debian.org/bookworm/openssh-server has various rec dependencies to e.g. xauth which pulls in various (for us / our purposes) unnecessary X11 dependencies. After this change the image size got reduced from:

REPOSITORY   TAG       IMAGE ID       CREATED          SIZE
debian       12        bbd0a7b950d6   39 seconds ago   190MB

to:

REPOSITORY   TAG       IMAGE ID       CREATED          SIZE
debian       12        cc5a6cc10e13   27 seconds ago   162MB

without any functional limitations.

Note: Ubuntu failures seems to be unrelated to this PR and might be related to VTA-589

Why

Reduce size of our images a little.

References

None

Checklist

  • Tests

@cfi-gb cfi-gb requested review from a team as code owners November 11, 2024 08:22
Copy link
Member

@n-thumann n-thumann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.877 E: Command line option --no-install-recommends is not understood

This option doesn't seem to be available in Debian Etch (https://github.com/greenbone/vt-test-environments/actions/runs/11774762855/job/32793938334?pr=64).

The other 6 build errors are already tracked in https://jira.greenbone.net/browse/VTA-589 and seem to be caused by something Docker-internal.

@cfi-gb
Copy link
Member Author

cfi-gb commented Nov 11, 2024

0.877 E: Command line option --no-install-recommends is not understood

This option doesn't seem to be available in Debian Etch (https://github.com/greenbone/vt-test-environments/actions/runs/11774762855/job/32793938334?pr=64).

Yes, noticed and already "on it" 👍

The other 7 build errors are already tracked in https://jira.greenbone.net/browse/VTA-589 and seem to be caused by something Docker-internal.

Yes, had included the reference in the PR description 👍

@cfi-gb
Copy link
Member Author

cfi-gb commented Nov 11, 2024

For the references, this is the difference in the installed packages for e.g. Debian trixie:

Before

#6 40.95 The following NEW packages will be installed:
#6 40.95   adduser dbus dbus-bin dbus-daemon dbus-session-bus-common
#6 40.95   dbus-system-bus-common dbus-user-session dmsetup krb5-locales libapparmor1
#6 40.95   libcbor0.10 libcryptsetup12 libdbus-1-3 libdevmapper1.02.1 libedit2
#6 40.95   libexpat1 libfido2-1 libgpm2 libgssapi-krb5-2 libjson-c5 libk5crypto3
#6 40.95   libkeyutils1 libkmod2 libkrb5-3 libkrb5support0 libncursesw6 libnss-systemd
#6 40.95   libpam-systemd libproc2-0 libsystemd-shared libwrap0 libx11-6 libx11-data
#6 40.95   libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 linux-sysctl-defaults
#6 40.95   ncurses-term openssh-client openssh-server openssh-sftp-server procps psmisc
#6 40.95   runit-helper sensible-utils systemd systemd-cryptsetup systemd-sysv
#6 40.95   systemd-timesyncd ucf xauth
#6 41.01 0 upgraded, 53 newly installed, 0 to remove and 0 not upgraded.
#6 41.01 Need to get 14.0 MB of archives.
#6 41.01 After this operation, 48.0 MB of additional disk space will be used.

After

#6 10.03 The following NEW packages will be installed:
#6 10.03   adduser libcbor0.10 libedit2 libfido2-1 libgssapi-krb5-2 libk5crypto3
#6 10.03   libkeyutils1 libkrb5-3 libkrb5support0 libncursesw6 libproc2-0 libwrap0
#6 10.03   openssh-client openssh-server openssh-sftp-server procps runit-helper
#6 10.03   sensible-utils ucf
#6 10.05 0 upgraded, 19 newly installed, 0 to remove and 0 not upgraded.
#6 10.05 Need to get 3724 kB of archives.
#6 10.05 After this operation, 14.4 MB of additional disk space will be used.

@cfi-gb cfi-gb force-pushed the no-install-recommends branch 3 times, most recently from a7ee708 to 3ae76a8 Compare November 11, 2024 08:50
@cfi-gb cfi-gb requested review from n-thumann and a team November 11, 2024 08:53
@cfi-gb cfi-gb force-pushed the no-install-recommends branch from 3ae76a8 to 6fcfff5 Compare November 11, 2024 09:16
Copy link
Member

@n-thumann n-thumann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
(All 6 failed image builds are caused due to VTA-589)

@n-thumann n-thumann merged commit 92fe5ec into main Nov 11, 2024
101 of 107 checks passed
@n-thumann n-thumann deleted the no-install-recommends branch November 11, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants