forked from seeleteam/monitor-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·30 lines (17 loc) · 783 Bytes
/
Dockerfile
File metadata and controls
executable file
·30 lines (17 loc) · 783 Bytes
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
# Go builder container
FROM golang:alpine as builder
RUN apk add --no-cache make gcc musl-dev linux-headers
ADD . /go/src/github.com/seeleteam/monitor-api
RUN cd /go/src/github.com/seeleteam/monitor-api && make all
# Alpine container
FROM alpine:latest
RUN apk add --no-cache ca-certificates
COPY --from=builder /go/src/github.com/seeleteam/monitor-api/build/monitor-api /monitor-api/
RUN cd monitor-api
RUN chmod +x monitor-api
ENV MONITOR_CONFIG_FILE=/monitor-api/config/monitor.json
EXPOSE 9997
ENTRYPOINT [ "/monitor-api/monitor-api", "start", "-c=/monitor-api/config/app.conf" ]
# start monitor-api with your 'app.conf' file, this file must be external from a volume
# For example:
# docker run -v <your app.conf directory>:/monitor-api/config:ro -it monitor-api