1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/graphite/Dockerfile

62 lines
1.9 KiB
Docker
Raw Normal View History

2017-03-11 12:05:03 +02:00
#
# Dockerfile for graphite
#
FROM alpine
2017-06-29 12:25:48 +02:00
MAINTAINER EasyPi Software Foundation
2017-03-11 12:05:03 +02:00
2019-11-24 13:28:12 +02:00
ENV GRAPHITE_VERSION=1.1.6
2017-03-11 12:05:03 +02:00
ENV GRAPHITE_CONF_DIR=/opt/graphite/conf
ENV GRAPHITE_STORAGE_DIR=/opt/graphite/storage
2017-06-29 14:27:02 +02:00
ENV PATH=$PATH:/opt/graphite/bin
ENV PYTHONPATH=/opt/graphite/lib:/opt/graphite/webapp
2017-03-11 12:05:03 +02:00
WORKDIR /opt/graphite
RUN set -xe \
&& apk update \
&& apk add build-base \
cairo \
curl \
git \
libffi-dev \
python \
python-dev \
&& curl -sSL https://bootstrap.pypa.io/get-pip.py | python \
2017-06-29 14:27:02 +02:00
&& pip install gunicorn scandir supervisor whisper==$GRAPHITE_VERSION \
&& pip install -r https://github.com/graphite-project/graphite-web/raw/$GRAPHITE_VERSION/requirements.txt \
&& pip install carbon==$GRAPHITE_VERSION --install-option="--install-lib=/opt/graphite/lib" \
&& pip install graphite-web==$GRAPHITE_VERSION --install-option="--prefix=/opt/graphite" --install-option="--install-lib=/opt/graphite/webapp" \
2017-03-11 12:05:03 +02:00
&& cd conf \
&& cp carbon.conf.example carbon.conf \
&& cp storage-schemas.conf.example storage-schemas.conf \
&& cd ../webapp \
&& echo "SECRET_KEY = '$(head -c 16 /dev/urandom | base64)'" > graphite/local_settings.py \
&& curl -sSL https://github.com/graphite-project/graphite-web/raw/master/webapp/manage.py > manage.py \
2017-03-14 10:25:09 +02:00
&& chmod +x manage.py \
2019-04-11 08:29:43 +02:00
&& ./manage.py collectstatic --noinput --settings=graphite.settings \
&& ./manage.py migrate --noinput --run-syncdb \
2017-03-11 12:05:03 +02:00
&& apk del build-base \
curl \
git \
libffi-dev \
python-dev \
&& rm -rf /root/.cache/pip \
/var/cache/apk/*
COPY supervisord.conf /etc/supervisor/
VOLUME $GRAPHITE_CONF_DIR \
$GRAPHITE_STORAGE_DIR
2018-11-08 05:04:08 +02:00
EXPOSE 2003/udp \
2003 \
2017-03-11 12:05:03 +02:00
2004 \
2018-11-08 05:04:08 +02:00
2023 \
2024 \
2017-03-11 12:05:03 +02:00
7002 \
8080 \
9001
CMD ["supervisord", "-n"]