Skip to content

hadolint/DL3047

Use wget --progress to avoid excessively bloated build logs.

Property Value
Severity Info
Category Best Practice
Default Enabled
Auto-fix Yes (--fix)

Description

wget without flag --progress will result in excessively bloated build logs when downloading larger files because it outputs a line for each fraction of a percentage point.

Examples

Problematic code

FROM ubuntu:20
RUN wget https://example.com/big_file.tar

Correct code

FROM ubuntu:20
RUN wget --progress=dot:giga https://example.com/big_file.tar

or:

FROM ubuntu:20
RUN wget -nv https://example.com/big_file.tar

Auto-fix

Adds --progress=dot:giga to wget commands. Skipped if -q, --quiet, -nv, --no-verbose, -o, --output-file, -a, --append-output, or --progress is already present.

# Before
RUN wget http://example.com/file.tar.gz

# After (with --fix)
RUN wget --progress=dot:giga http://example.com/file.tar.gz

Reference