Section 4 (Container Images and Build File)
| 섹션 | 항목 | 설명 |
|---|---|---|
| 4.1 | Create user for the container | non-root USER 지정 |
| 4.2 | Use trusted base images | 명시적인 베이스 이미지 버전 사용, latest 태그 회피 |
| 4.3 | Do not install unnecessary packages | 불필요한 패키지 및 권장 패키지 설치 최소화 |
| 4.6 | Add HEALTHCHECK | HEALTHCHECK 명령 정의 |
| 4.7 | Do not use update instructions alone | apt-get update와 install을 한 RUN으로 결합 |
| 4.9 | Use COPY instead of ADD | ADD 대신 COPY 사용 |
| 4.10 | Do not store secrets in Dockerfile | 비밀정보 하드코딩 금지 |