Updated multi-stage build doc (#8769)

Changed the 'as' keyword to 'AS' to match the Dockerfile reference docs here: https://docs.docker.com/engine/reference/builder/#from
This commit is contained in:
Brodie Kurczynski 2019-05-07 15:50:09 -07:00 committed by Maria Bermudez
parent 96359c7add
commit 5e39c6f664
1 changed files with 2 additions and 2 deletions

View File

@ -131,13 +131,13 @@ intermediate artifacts are left behind, and not saved in the final image.
By default, the stages are not named, and you refer to them by their integer By default, the stages are not named, and you refer to them by their integer
number, starting with 0 for the first `FROM` instruction. However, you can number, starting with 0 for the first `FROM` instruction. However, you can
name your stages, by adding an `as <NAME>` to the `FROM` instruction. This name your stages, by adding an `AS <NAME>` to the `FROM` instruction. This
example improves the previous one by naming the stages and using the name in example improves the previous one by naming the stages and using the name in
the `COPY` instruction. This means that even if the instructions in your the `COPY` instruction. This means that even if the instructions in your
Dockerfile are re-ordered later, the `COPY` doesn't break. Dockerfile are re-ordered later, the `COPY` doesn't break.
```conf ```conf
FROM golang:1.7.3 as builder FROM golang:1.7.3 AS builder
WORKDIR /go/src/github.com/alexellis/href-counter/ WORKDIR /go/src/github.com/alexellis/href-counter/
RUN go get -d -v golang.org/x/net/html RUN go get -d -v golang.org/x/net/html
COPY app.go . COPY app.go .