freego_api/Dockerfile

13 lines
183 B
Docker
Raw Normal View History

2022-03-07 20:51:46 -05:00
FROM golang:1.17 as base
2022-03-07 21:42:37 -05:00
WORKDIR /app
COPY go.mod .
COPY go.sum .
2022-03-07 20:51:46 -05:00
FROM base as source
2022-03-07 21:42:37 -05:00
COPY ./*.go /app/
2022-03-07 20:51:46 -05:00
2022-03-07 21:42:37 -05:00
RUN ls /app/
RUN go build -o freego_api .
2022-03-07 20:51:46 -05:00
EXPOSE 1379
2022-03-07 21:42:37 -05:00
CMD [ "./freego_api" ]