v0.3.2
Jun 27, 2024
85
version = 1
[[analyzers]]
name = "docker"
[analyzers.meta]
dockerfile_paths = [
"dev.dockerfile",
"prod.dockerfile"
]
trusted_registries = [
"my-registry.com",
"docker.io"
]
Anti-pattern
17
Bug risk
56
Performance
9
Security
2
Style
1
root
when the Dockerfile completes DOK-DL3002Switching to the root USER
opens up certain security risks if an attacker gets access to the container. In order to mitigate this, switch back to a non privileged user after running the commands you need as root.
apt-get
lists after installing anything DOK-DL3009Cleaning 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
.