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

69 lines
2.0 KiB
Docker
Raw Normal View History

2017-03-11 12:05:03 +02:00
#
# Dockerfile for graphite
#
2020-03-18 07:00:27 +02:00
FROM alpine:3
2017-06-29 12:25:48 +02:00
MAINTAINER EasyPi Software Foundation
2017-03-11 12:05:03 +02:00
2022-06-13 08:19:38 +02:00
ENV GRAPHITE_VERSION=1.1.10
2017-03-11 12:05:03 +02:00
ENV GRAPHITE_CONF_DIR=/opt/graphite/conf
ENV GRAPHITE_STORAGE_DIR=/opt/graphite/storage
2020-03-24 10:26:40 +02:00
ENV DJANGO_SETTINGS_MODULE=graphite.settings
ENV PATH=/opt/graphite/bin:$PATH
2017-06-29 14:27:02 +02:00
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 \
libffi-dev \
2020-03-24 10:26:40 +02:00
nginx \
python3 \
python3-dev \
&& curl -sSL https://bootstrap.pypa.io/get-pip.py | python3 \
2021-11-11 09:37:05 +02:00
&& pip3 install pip==20.1 \
&& pip3 install --no-cache-dir gunicorn supervisor \
&& pip3 install --no-cache-dir --install-option=--prefix=/opt/graphite \
2020-03-24 10:26:40 +02:00
--install-option=--install-lib=/opt/graphite/lib \
whisper==$GRAPHITE_VERSION \
carbon==$GRAPHITE_VERSION \
&& pip3 install --no-cache-dir --install-option=--prefix=/opt/graphite \
2020-03-24 10:26:40 +02:00
--install-option=--install-lib=/opt/graphite/webapp \
graphite-web==$GRAPHITE_VERSION \
2021-11-11 10:05:23 +02:00
&& pip3 install pyparsing==2.4.7 \
2020-03-24 10:26:40 +02:00
&& cd ./webapp \
&& echo "SECRET_KEY = '$(head -c 16 /dev/urandom | base64)'" >> graphite/local_settings.py \
&& cd ../conf \
2017-03-11 12:05:03 +02:00
&& cp carbon.conf.example carbon.conf \
&& cp storage-schemas.conf.example storage-schemas.conf \
2020-03-24 10:26:40 +02:00
&& cp aggregation-rules.conf.example aggregation-rules.conf \
&& cd .. \
&& django-admin collectstatic --noinput \
&& django-admin migrate --noinput --run-syncdb \
2017-03-11 12:05:03 +02:00
&& apk del build-base \
curl \
libffi-dev \
2021-11-11 09:37:05 +02:00
python3-dev \
2017-03-11 12:05:03 +02:00
&& rm -rf /root/.cache/pip \
/var/cache/apk/*
2021-11-11 10:05:23 +02:00
COPY nginx.conf /etc/nginx/http.d/default.conf
2017-03-11 12:05:03 +02:00
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"]