Skip to content

Instantly share code, notes, and snippets.

@PierreZ
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PierreZ/36240fbf7774f8ae2205 to your computer and use it in GitHub Desktop.
Save PierreZ/36240fbf7774f8ae2205 to your computer and use it in GitHub Desktop.
InfluxDB Docker
FROM phusion/baseimage:latest
MAINTAINER Pierre Zemb contact@pierrezemb.fr
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
# ...put your own build instructions here...
#RUN apt-get install -y wget
# Installing latest version of influxdb
RUN curl -sf -o /tmp/influxdb.deb http://s3.amazonaws.com/influxdb/influxdb_latest_amd64.deb
RUN dpkg -i /tmp/influxdb.deb
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN mkdir /etc/service/influxdb
RUN cp /etc/init.d/influxdb /etc/service/influxdb/run
# Admin server
EXPOSE 8083
# HTTP API
EXPOSE 8086
# HTTPS API
#EXPOSE 8084
# Raft port (for clustering, don't expose publicly!)
#EXPOSE 8090
# Protobuf port (for clustering, don't expose publicly!)
#EXPOSE 8099
#!/bin/bash
set -e;
docker build -t pierrezemb/influxdb_img .;
# based on https://docs.docker.com/userguide/dockerlinks/
docker run -d -p 127.0.0.1:8083:8083 -p 8086:8086 -v /srv/influxdb-docker/data:/opt/influxdb/shared/data --name influxdb pierrezemb/influxdb_img /sbin/my_init influxdb start;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment