标签:logs pre cache dock org copy add cert exe
FROM golang:1.7.3 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 GOOS=linux go build -a -installsuffix cgo -o app . FROM alpine:latest RUN apk --no-cache add ca-certificates WORKDIR /root/ COPY --from=0 /go/src/github.com/alexellis/href-counter/app . CMD ["./app"]
$ docker build -t alexellis2/href-counter:latest .
[Docker] 使用 Dockerfile 的多级构建 (multi-stage builds)
标签:logs pre cache dock org copy add cert exe
原文地址:https://www.cnblogs.com/farwish/p/9240609.html