WeatherService/Dockerfile

20 lines
247 B
Docker
Raw Normal View History

2020-07-20 20:03:08 +02:00
FROM golang:latest as builder
2020-07-20 20:33:31 +02:00
2020-07-21 11:39:37 +02:00
COPY . /
2020-07-20 20:33:31 +02:00
WORKDIR /src
2020-07-20 18:06:32 +02:00
2020-07-21 11:39:37 +02:00
ENV GO111MODULE=on
RUN go mod download
RUN cd server
RUN go mod download
RUN cd ..
2020-07-20 20:31:18 +02:00
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-21 11:39:37 +02:00
COPY --from=builder /src/weather .
2020-07-20 18:06:32 +02:00
2020-07-21 11:39:37 +02:00
CMD ["./weather"]
EXPOSE 8080