DeepSource
Dashboard Resources Pricing Discover Directory Log in

Run your first analysis.

Find thousands of code security and quality issues in your codebase, before they end up in production.

Start now
All analyzers Docker
Docker

Docker

By DeepSource

Use Analyzer
Docs
Discuss
Use any one of wget or curl but not both DOK-DL4001
Anti-pattern

Don't install two tools that have the same effect to avoid the additional cruft.

Do not use sudo DOK-DL3004
Anti-pattern

Do not use sudo as it leads to unpredictable behavior and possibly security vulnerabilities. Use a tool like gosu to perform user switching operations.

Possible parameter declaration detected DOK-SC1065
Anti-pattern

Use function_name() and refer to passed parameters as $1, $2 etc. Shell script functions behave just like scripts and other commands: - They always take 0 to N parameters, referred to by $1, $2 etc. They cannot declare parameters by name.

Delete the apt-get lists after installing anything DOK-DL3009
Performance

Cleaning up the apt cache and removing /var/lib/apt/lists helps keep the image size down. Since the RUN statement starts with apt-get update, the package cache will always be refreshed prior to apt-get install.

Use absolute WORKDIR DOK-DL3000
Bug risk

By using absolute paths you will not run into problems when a previous WORKDIR instruction changes. You also often don't know the WORKDIR context of your base container.