-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
Dockerfile
36 lines (26 loc) · 896 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
33
34
35
36
# Build container;
FROM openfalcon/makegcc-golang:1.15-alpine
LABEL maintainer laiwei.ustc@gmail.com
USER root
ENV FALCON_DIR=/open-falcon PROJ_PATH=${GOPATH}/src/github.com/open-falcon/falcon-plus
RUN mkdir -p $FALCON_DIR && \
mkdir -p $FALCON_DIR/logs && \
apk add --no-cache ca-certificates bash git supervisor
COPY . ${PROJ_PATH}
WORKDIR ${PROJ_PATH}
RUN make all \
&& make pack4docker \
&& tar -zxf open-falcon-v*.tar.gz -C ${FALCON_DIR} \
&& rm -rf ${PROJ_PATH}
# Final container;
FROM alpine:3.13
LABEL maintainer laiwei.ustc@gmail.com
USER root
ENV FALCON_DIR=/open-falcon
RUN mkdir -p $FALCON_DIR/logs && \
apk add --no-cache ca-certificates bash git supervisor
ADD docker/supervisord.conf /etc/supervisord.conf
COPY --from=0 ${FALCON_DIR} ${FALCON_DIR}
EXPOSE 8433 8080
WORKDIR ${FALCON_DIR}
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]