diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..45e90d0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +*.md +hooks/ +build/ +Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..94e137c --- /dev/null +++ b/Dockerfile @@ -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"]