bosun.org@v0.0.0-20210513094433-e25bc3e69a1f/docker/Dockerfile (about)

     1  FROM golang:1.13 AS bosun_builder
     2  
     3  WORKDIR /bosun
     4  COPY . /bosun
     5  
     6  RUN make bosun scollector tsdbrelay
     7  
     8  FROM alpine:latest
     9  
    10  ARG PACKAGES="ca-certificates rsyslog bash libc6-compat curl libgd libpng libjpeg libwebp libjpeg-turbo cairo pango lua supervisor asciidoctor"
    11  
    12  ARG DOCKER_ROOT="docker"
    13  
    14  ENV DATA_DIR=/data
    15  
    16  ENV TERM xterm
    17  ENV TSDBRELAY_OPTS -b localhost:8070 -t opentsdb:4242 -l 0.0.0.0:5252 -redis localhost:9565
    18  
    19  # Install dependencies
    20  RUN apk --update add apk-tools \
    21      && apk add ${PACKAGES}
    22  
    23  # Copy Bosun from the build image
    24  WORKDIR /bosun
    25  RUN mkdir /scollector /tsdbrelay
    26  COPY --from=bosun_builder /bosun/bosun /bosun
    27  COPY --from=bosun_builder /bosun/scollector /scollector
    28  COPY --from=bosun_builder /bosun/tsdbrelay /tsdbrelay
    29  
    30  # Copy Bosun config
    31  COPY ${DOCKER_ROOT}/data/bosunrules.conf ${DATA_DIR}/
    32  COPY ${DOCKER_ROOT}/data/bosun.toml ${DATA_DIR}/
    33  COPY ${DOCKER_ROOT}/data/scollector.toml ${DATA_DIR}/
    34  
    35  # Copy supervisor config
    36  COPY ${DOCKER_ROOT}/data/supervisord.conf ${DATA_DIR}/
    37  
    38  EXPOSE 8070 5252 9565
    39  VOLUME ["${DATA_DIR}"]
    40  CMD ["sh", "-c", "/usr/bin/supervisord -c ${DATA_DIR}/supervisord.conf"]