Skip to content

hadolint/DL4001

Either use Wget or Curl but not both.

Property Value
Severity Warning
Category Best Practice
Default Enabled

Description

Don't install two tools that have the same effect. Using both wget and curl in a Dockerfile adds unnecessary cruft to the image. Pick one and use it consistently.

Examples

Problematic code

FROM debian
RUN wget http://google.com
RUN curl http://bing.com

Correct code

FROM debian
RUN curl http://google.com
RUN curl http://bing.com

Reference