mirror of
https://github.com/yeasy/docker_practice.git
synced 2025-08-04 15:01:45 +00:00
Update Dockerfile multistage-builds #320
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user