4 ms·
If the author is here, I think there's a typo in this. In section 1.4, you start working from the scratch layer, but the content continues to refer to alpine as
by jmholla 2y ago
If the author is here, I think there's a typo in this. In section 1.4, you start working from the scratch layer, but the content continues to refer to alpine as the base layer.
FROM scratch
COPY ./hello /root/
ENTRYPOINT ["./hello"]
> Here, our image contains 2 layers. The first layer comes from the base image, the alpine official docker image i.e. the root filesystem with all the standard shell tools that come along with an alpine distribution. Almost every instruction inside a Containerfile generates another layer. So in the Containerfile above, the COPY instruction creates the second layer which includes filesystem changes to the layer before it. The change here is “adding” a new file—the hello binary—to the existing filesystem i.e. the alpine root filesystem.
- psnehanshu 2y agoThat, and they also added the "time" command in the config with the scratch base image.
- prakashdanish 2y agoThanks for pointing that out, I'm curating a PR with all the suggestion from here, should be fixed soon!