1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-16 11:58:47 +00:00
dockerfiles/statsd/Dockerfile
2021-11-11 17:14:06 +08:00

24 lines
554 B
Docker

#
# Dockerfile for statsd
#
FROM alpine:3
MAINTAINER EasyPi Software Foundation
ENV STATSD_VERSION=0.9.0
ENV STATSD_URL=https://github.com/statsd/statsd/archive/refs/tags/v$STATSD_VERSION.tar.gz
WORKDIR /opt/statsd
RUN set -xe \
&& apk add --no-cache ca-certificates curl nodejs npm tar \
&& curl -sSL $STATSD_URL | tar xz --strip 1 \
&& npm install --production \
&& sed 's/graphite.example.com/graphite/' exampleConfig.js > config.js \
&& apk del curl tar
EXPOSE 8125/udp
EXPOSE 8126/tcp
CMD ["node", "stats.js", "config.js"]