Documentation: Correct Dockerfile reference FROM for base images
File: engine/reference/builder.md
Description
The Dockerfile reference for the FROM instruction states that
- "a valid Dockerfile must start with a FROM instruction" and
- "ARG is the only instruction that may precede FROM in the Dockerfile."
The developer guide page on how to Create a base image states that
- "A base image either has no FROM line in its Dockerfile, or has FROM scratch."
Describe the results you expected:
The Dockerfile reference should
- match the description in the developer guide and
- refer to "scratch" as an empty image in the repository for this purpose.
Docker Version
18.03
Thanks for reporting; I think that passage in the docs originates from base images that are not created using a Dockerfile, but through docker import; it looks like most (if not all) official base images nowadays are created using a Dockerfile (e.g. the busybox image; https://github.com/docker-library/busybox/blob/fe634680e32659aaf0ee0594805f74f332619a90/uclibc/Dockerfile), but it's possible to create an image without using a Dockerfile, and docker import; see this section in the documentation; https://docs.docker.com/develop/develop-images/baseimages/
Perhaps that option doesn't need to be mentioned in the builder documentation (to not confuse readers); open to suggestions if you have any :smile:
/cc @tianon
Erm. never mind; I see the passage was in the "create a base image" section; I was confused, and thought it was in "builder"
Perhaps it should be changed to;
either has no Dockerfile
(remove no FROM in its)
@thaJeztah I'm having a difficult time figuring out what needs to be changed here. Could you please clarify for me? Thanks.
looks like this went stale. closing