21 lines
248 B
Docker
21 lines
248 B
Docker
FROM golang:latest as builder
|
|
|
|
COPY . /
|
|
WORKDIR /src
|
|
|
|
ENV GO111MODULE=on
|
|
|
|
RUN go mod download
|
|
RUN cd server
|
|
RUN go mod download
|
|
RUN cd ..
|
|
|
|
RUN go build
|
|
|
|
FROM alpine:latest
|
|
WORKDIR /
|
|
COPY --from=builder /src/weather .
|
|
|
|
CMD ["./weather"]
|
|
EXPOSE 8080
|