-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
32 lines (22 loc) · 698 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Builder
ARG GITHUB_PATH=github.com/ozonmp/srv-verification-api
FROM golang:1.16-alpine AS builder
WORKDIR /home/${GITHUB_PATH}
RUN apk add --update make git protoc protobuf protobuf-dev curl
COPY Makefile Makefile
RUN make deps-go
COPY . .
RUN make build-go
# gRPC Server
FROM alpine:latest as server
LABEL org.opencontainers.image.source https://${GITHUB_PATH}
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /home/${GITHUB_PATH}/bin/grpc-server .
COPY --from=builder /home/${GITHUB_PATH}/config.yml .
COPY --from=builder /home/${GITHUB_PATH}/migrations/ ./migrations
RUN chown root:root grpc-server
EXPOSE 50051
EXPOSE 8080
EXPOSE 9100
CMD ["./grpc-server"]