此内容还未提供中文版,以下为英文版

scratch

预计阅读时间: 1 分钟

an explicitly empty image, especially for building images “FROM scratch”

GitHub repo:

Library reference

This content is imported from the official Docker Library docs, and is provided by the original uploader. You can view the Docker Store page for this repo at https://store.docker.com/images/scratch.

FROM scratch

This image is most useful in the context of building base images (such as debian and busybox) or super minimal images (that contain only a single binary and whatever it requires, such as hello-world).

As of Docker 1.5.0 (specifically, docker/docker#8827), FROM scratch is a no-op in the Dockerfile, and will not create an extra layer in your image (so a previously 2-layer image will be a 1-layer image instead).

library, sample, scratch