add Dockerfile for deployments

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2021-11-08 13:55:13 +01:00 committed by Jakub
parent aef686cf70
commit 82c72d2301
2 changed files with 26 additions and 0 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
*.md
hooks/
build/
Dockerfile

22
Dockerfile Normal file
View File

@ -0,0 +1,22 @@
FROM golang:1.15-alpine AS builder
RUN apk add --no-cache make
RUN mkdir -p /go/src/github.com/status-im/telemetry
WORKDIR /go/src/github.com/status-im/telemetry
ADD . .
RUN make build
# Copy the binary to the second image
FROM alpine:3.14
LABEL maintainer="jakub@status.im"
LABEL source="https://github.com/status-im/telemetry"
LABEL description="Opt-in message reliability metrics service"
COPY --from=builder /go/src/github.com/status-im/telemetry/build/server /usr/local/bin/telemetry
EXPOSE 8080/tcp
ENTRYPOINT ["/usr/local/bin/telemetry"]
CMD ["-help"]