Is this a docs issue?
Type of issue
Clarification
Description
The last line of the following example snippet may confuse some beginners:
FROM ubuntu AS base
RUN apt-get update && apt-get install -y shared-tooling
FROM base AS dev
RUN apt-get install -y dev-tooling
FROM base AS prod
COPY --from=build /app /app
as there is no named build stage in the snippet. I understand that it can merely be assumed such a stage exists, but since the prod stage is built from the base base image, it takes a second to comprehend there were merely omitted steps.
Location
https://docs.docker.com/reference/dockerfile/
Suggestion
Although a bit more verbose, it would perhaps be clearer to have something along the lines of:
FROM ubuntu AS base
RUN apt-get update && apt-get install -y shared-tooling
RUN mkdir /app && touch base.txt
FROM base AS dev
RUN apt-get install -y dev-tooling
FROM base AS prod
COPY --from=base /app /app
in which everything is explicit.
Is this a docs issue?
Type of issue
Clarification
Description
The last line of the following example snippet may confuse some beginners:
as there is no named
buildstage in the snippet. I understand that it can merely be assumed such a stage exists, but since theprodstage is built from thebasebase image, it takes a second to comprehend there were merely omitted steps.Location
https://docs.docker.com/reference/dockerfile/
Suggestion
Although a bit more verbose, it would perhaps be clearer to have something along the lines of:
in which everything is explicit.