#
# container-insights
#
# Send the docker container status to Azure Application Insight on every minute.
#
# Run it:
#   docker run -d --privileged --restart always \
#     -v /var/run/docker.sock:/var/run/docker.sock \
#     -e IKEY=12345678-1234-1234-1234-1234567890xx \
#     -e PREFIX=docker-01 \
#     lijunle/container-insights
#
# Environment variable:
#   IKEY: The Instrumentation key for the Application Insight instance.
#   PREFIX: The prefix of the metric name.
#

FROM alpine
LABEL maintainer="Junle Li <lijunle@gmail.com>"

ENV IKEY=
ENV PREFIX=docker

WORKDIR /app

RUN apk add --no-cache curl jq findutils
COPY ./insights.sh ./
ENTRYPOINT [ "sh", "./insights.sh" ]