WeatherService/Dockerfile

15 lines
246 B
Docker

FROM golang:latest as builder
RUN mkdir -p /go/src/folder
WORKDIR /go/src/folder
COPY /src .
RUN go get -u ./...
RUN go build
FROM alpine:latest
WORKDIR /
COPY --from=builder /go/src/folder/weatherservice .
EXPOSE 8080
CMD ["/weatherservice"]