apt-get dist-upgrade used

ID

apt_distupgrade_used

Severity

low

Family

Container Security

Tags

dockerfile, flaw, non-reachable

Description

'apt-get dist-upgrade' upgrades a major version but it does not make sense in Dockerfile. Use a different, upgraded base image instead.

Security

N/A

Examples

# dist-upgrade does not make sense in image build
# use an updated base image instead

RUN apt-get update && apt-get dist-upgrade

Mitigation / Fix

Use an updated base image (FROM command) instead.