task3 deployment

This commit is contained in:
2020-01-05 18:52:16 +01:00
parent ba0240aa84
commit 4e0a675ee3
3 changed files with 49 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
FROM alpine as builder
ENV GOPATH /root/go
ENV PATH ${GOPATH}/bin:${PATH}
RUN mkdir -p /app
WORKDIR /app
RUN apk add --no-cache go git curl gcc g++ make
COPY . .
RUN go build -o task3 github.com/mainnika/a-quest/task3-backend
FROM alpine
ENV GOPATH /root/go
ENV PATH ${GOPATH}/bin:${PATH}
RUN mkdir -p /app /app/postbox
WORKDIR /app
COPY --from=builder /app/task3 .
COPY --from=builder /app/task3-backend/config config
EXPOSE 8081
EXPOSE 31337
VOLUME /app/postbox
CMD ["/app/task3"]