18 lines
428 B
Docker
Raw Normal View History

2020-12-08 13:54:06 +11:00
################ DEV IMAGE ################
FROM golang:1.12.5-alpine3.9 as dev
RUN apk update && apk upgrade && \
apk add --no-cache git
RUN go get github.com/sirupsen/logrus
RUN go get github.com/buaazp/fasthttprouter
RUN go get github.com/valyala/fasthttp
WORKDIR /work
COPY ./src /work/
RUN go build -o app
################## PROD IMAGE #################
FROM alpine:3.9 as prod
COPY --from=dev /work/app /
CMD ./app