- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
",t};e.buildCustomizationMenuUi=t;function n(e){let t='
",t}function s(e){let n=e.filter.currentValue||e.filter.defaultValue,t='${e.filter.label}
`,e.filter.options.forEach(s=>{let o=s.id===n;t+=``}),t+="${e.filter.label}
`,t+=`ID: docker-best-practices/only-use-allowed-registry
Language: Docker
Severity: Error
Category: Best Practices
This rule enforces the use of only allowed registries in the FROM
instruction of a Dockerfile. It ensures that base images are pulled from trusted and verified sources, reducing the risk of introducing malicious or unverified software into your container environment.
To comply with this rule, always specify base images using registries that are explicitly permitted by your organization’s policies. For example, use FROM python:3.6
or FROM docker.io/python:3.6
instead of FROM randomrepo/python:3.6
. This practice helps ensure that the images you use are reliable and vetted.
You can specify the exact list of registries to check by defining the registries
argument and separate them with a comma. There is an example of how to tweak your configuration file to add registry1
and registry2
.
rulesets:
- docker-best-practices:
rules:
only-use-allowed-registry:
arguments:
registries: registry1,registry2
registries
: comma-separated list of trusted registriesFROM registry.somedomain.com/images/mirror/dgraph/dgraph:v1.1.0
FROM x.com/debian
FROM randomrepo/python:3.6
FROM registry.something.io/images/base/ubuntu_2204:release
RUN acommand
FROM ubuntu:18.04 AS builder1
FROM builder1 AS builder2
FROM python:3.6
RUN acommand
FROM docker.io/python:3.6
FROM scratch
RUN acommand