2021-02-08 13:43:09 +11:00
|
|
|
FROM golang:1.12.5-alpine3.9 as dev
|
2021-02-08 11:40:44 +11:00
|
|
|
|
|
|
|
# installing git
|
|
|
|
RUN apk update && apk upgrade && \
|
|
|
|
apk add --no-cache git
|
|
|
|
|
|
|
|
RUN go get github.com/sirupsen/logrus
|
|
|
|
RUN go get github.com/buaazp/fasthttprouter
|
2021-02-08 13:43:09 +11:00
|
|
|
RUN go get github.com/valyala/fasthttp
|
|
|
|
|
|
|
|
WORKDIR /work
|
|
|
|
COPY ./src /work/
|
|
|
|
RUN go build -o app
|
|
|
|
###########START NEW IMAGE###################
|
|
|
|
|
|
|
|
FROM alpine:3.9 as prod
|
|
|
|
COPY --from=dev /work/app /
|
|
|
|
CMD ./app
|