Computer scienceSystem administration and DevOpsDockerBuilding images with Dockerfile

Multiple stage building

Base image

Report a typo

FROM golang:1.16 AS builder
WORKDIR /go/src/github.com/alexellis/href-counter/
RUN go get -d -v golang.org/x/net/html  
COPY app.go ./
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o app .

FROM alpine:latest  
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /go/src/github.com/alexellis/href-counter/app ./
CMD ["./app"] 

What base image is used in the "builder" stage of the Dockerfile?

Select one option from the list

Create a free account to access the full topic