Dockerfile: add code to build from repo

This commit is contained in:
Victor Shyba 2021-08-26 00:29:06 -03:00
parent 031c3bfe4e
commit aa2fd9dd10

View file

@ -1,5 +1,10 @@
FROM debian:10-slim
FROM golang:alpine as stage1
EXPOSE 50051
COPY ./hub /hub
RUN mkdir /app
WORKDIR /app
COPY . /app
RUN go build
FROM alpine:latest
COPY --from=stage1 /app/hub /hub
ENTRYPOINT ["/hub", "serve"]