2020-07-20 20:03:08 +02:00
|
|
|
FROM golang:latest as builder
|
|
|
|
RUN mkdir -p /go/src/folder
|
|
|
|
WORKDIR /go/src/folder
|
|
|
|
COPY /src .
|
2020-07-20 18:06:32 +02:00
|
|
|
|
2020-07-20 20:31:18 +02:00
|
|
|
RUN go get -u ./...
|
|
|
|
RUN go build
|
2020-07-20 19:42:18 +02:00
|
|
|
|
2020-07-20 20:03:08 +02:00
|
|
|
FROM alpine:latest
|
|
|
|
WORKDIR /
|
2020-07-20 20:31:18 +02:00
|
|
|
COPY --from=builder /go/src/folder/weatherservice .
|
2020-07-20 20:03:08 +02:00
|
|
|
EXPOSE 8080
|
2020-07-20 18:06:32 +02:00
|
|
|
|
2020-07-20 20:31:18 +02:00
|
|
|
CMD ["/weatherservice"]
|