docs/scratch
yosifkit 63c9218175
Add Docker Hub categories (#2446)
* Add repo metadata, start with categories!

scripts for checking repo categories, updating the canonical set
added categories to push.pl

* Add initial set of semi-acurate categories

* Adjustments following tianon's review

* Simplify metadata.sh use cases (CI or interactive); just diff and check all the time

Update README.md about metadata.sh usage

* Unify the categories checks into one jq expressions

* Update initial categories

* Link to Docker docs for categories; minor categories script adjustments
2024-05-17 11:44:00 -07:00
..
README-short.txt Add a bunch more content 2014-10-10 18:07:15 -06:00
README.md Add a quote blurb from the upstream docs to the scratch description 2017-07-03 10:57:26 -07:00
metadata.json Add Docker Hub categories (#2446) 2024-05-17 11:44:00 -07:00

README.md

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).

From https://docs.docker.com/engine/userguide/eng-image/baseimages/:

You can use Dockers reserved, minimal image, scratch, as a starting point for building containers. Using the scratch “image” signals to the build process that you want the next command in the Dockerfile to be the first filesystem layer in your image.

While scratch appears in Dockers repository on the hub, you cant pull it, run it, or tag any image with the name scratch. Instead, you can refer to it in your Dockerfile. For example, to create a minimal container using scratch:

FROM scratch
COPY hello /
CMD ["/hello"]