Public | Automated Build

Last pushed: a year ago
Short Description
Image for Graphite Project
Full Description


  • Dockerfile for Graphite Project
  • Build on top of Alpine Linux
  • Uses graphite-web branch ported to Django 1.9
  • Size: ~140MB (~100MB in Alpine packages)


This image is intended to be used behind an HTTP server like nginx. (See below for development mode.)

  • Pull image docker pull rvernica/graphite or build image docker build -t graphite .
  • Pull official nginx image docker pull nginx
  • Create nginx configuration file, nginx.conf:

    http {
        server {
            location /static {
                alias /opt/graphite/static;
            location / {
                proxy_pass http://graphite:8080;

    An example is provided here

  • Start graphite container:

    docker run --name graphite \
        --publish 2003:2003 \

    On startup, a superuser is created for the grapite-web module with a randomly generated password. The credentials are printed on the screen:

    [graphite-web] Superuser: admin, Password: ...

    If you are starting the container with --detach, you can get the credentials by running docker logs graphite. Port 8080 does not need to be published because the container is going to be linked to the nginx container below.

  • Start nginx container:

    docker run --name nginx --publish 80:80 \
        --link graphite:graphite --volumes-from graphite \
        --volume /some/nginx.conf:/etc/nginx/nginx.conf:ro \

Additionally this image can also be used without any HTTP server in development mode:

docker run --publish 2003:2003 --publish 8080:8080 \
    rvernica/graphite \
    /bin/ash -c "\
        /opt/graphite/bin/ start && \
        PYTHONPATH=/opt/graphite/webapp DJANGO_SETTINGS_MODULE=graphite.settings python /usr/local/bin/ --debug && \
        PYTHONPATH=/opt/graphite/whisper /opt/graphite/bin/ --libs=/opt/graphite/webapp/ /opt/graphite/"

If you would like to use a URL prefix (e.g., /graphite), you need to set the URL_PREFIX = '...' variable in the (/opt/graphite/webapp/graphite/ file. This can be done in the script before you build the image. See Graphite documentation for additional details.

Docker Pull Command
Source Repository