Add Dockerfile

This commit is contained in:
Ivan Daniluk 2018-06-15 19:12:42 +02:00 committed by GitHub
commit 438cf82a82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 0 deletions

24
Dockerfile Normal file
View File

@ -0,0 +1,24 @@
# Build status-go in a Go builder container
FROM golang:1.10-alpine as builder
ARG build_tags
ARG build_flags
RUN apk add --no-cache git make gcc musl-dev linux-headers
ENV REPO=/go/src/github.com/status-im/p2p-health-bot
RUN mkdir -p ${REPO}
ADD . ${REPO}
RUN cd ${REPO} && go get && go build
# Copy the binary to the second image
FROM alpine:latest
RUN apk add --no-cache ca-certificates bash
ENV REPO=/go/src/github.com/status-im/p2p-health-bot
COPY --from=builder ${REPO}/p2p-health-bot /usr/local/bin/
EXPOSE 8080

4
Makefile Normal file
View File

@ -0,0 +1,4 @@
all: docker-image
docker-image:
docker build -t statusteam/p2p-health-bot .

View File

@ -53,6 +53,11 @@ Currently exposed metrics:
- `msgs_received`
- `msgs_responses_latency`
### Deployment
This software is deployed via Docker image built with `Dockerfile` ran from the `Makefile`. The image is then pushed to:
https://hub.docker.com/r/statusteam/p2p-health-bot/
# License
MIT