Update Dockerfile multistage-builds #320

This commit is contained in:
khs1994
2018-03-10 09:16:43 +08:00
parent 3b59591f14
commit 0db00b9669
2 changed files with 26 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
FROM golang:1.9-alpine
FROM golang:1.9-alpine as builder
RUN apk --no-cache add git
@@ -10,7 +10,7 @@ COPY app.go .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
FROM alpine:latest
FROM alpine:latest as prod
RUN apk --no-cache add ca-certificates