From bd050555053e39e3681ad384a5621405c0f10d83 Mon Sep 17 00:00:00 2001 From: Jacob Colvin Date: Thu, 30 Jul 2020 19:15:07 -0400 Subject: [PATCH] Add dockerfile --- Dockerfile | 12 ++++++++++++ README.md | 8 ++++++++ 2 files changed, 20 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cc0c5d2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +ARG ARCH="amd64" +ARG OS="linux" +FROM quay.io/prometheus/busybox:latest +LABEL maintainer="Jacob Colvin (MacroPower) " + +ARG ARCH="amd64" +ARG OS="linux" +COPY .build/${OS}-${ARCH}/wakatime_exporter /bin/wakatime_exporter + +USER nobody +ENTRYPOINT ["/bin/wakatime_exporter"] +EXPOSE 9212 diff --git a/README.md b/README.md index cda1769..6fde676 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Prometheus exporter for Wakatime statistics. You can get your Wakatime API key by visiting https://wakatime.com/api-key +## Usage + ```text usage: wakatime_exporter --wakatime.api-key=WAKATIME.API-KEY [] @@ -25,3 +27,9 @@ Flags: --version Show application version. ``` + +## Docker + +```shell +docker run -p 9212:9212 macropower/wakatime-exporter:0.0.1 --wakatime.api-key="YOUR_API_KEY" +```