이 페이지는 아직 영어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우 언제든지 연락주시기 바랍니다.

Metadata

ID: docker-best-practices/no-from-image

Language: Docker

Severity: Warning

Category: Best Practices

Description

The rule stipulates that all Dockerfiles must specify a base image. This is important because without specifying a base image, you are building a container from scratch, and this is likely what is not intended.

To avoid violating this rule, always declare a base image at the start of your Dockerfile using the FROM keyword. For example, FROM ubuntu:18.04 sets the base image to Ubuntu 18.04.

Non-Compliant Code Examples

RUN echo "hello"

Compliant Code Examples

FROM image as base

# foo

FROM image2
PREVIEWING: aliciascott/DOCS-9725-Cloudcraft