Skip to content

Commit

Permalink
build docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
blurrcat committed May 22, 2016
1 parent 48b1837 commit 28a3393
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Dockerfile
@@ -0,0 +1,9 @@
FROM busybox

RUN mkdir -p /data/graphite/whisper/
ADD go-carbon /usr/sbin
ADD conf-examples/* /data/graphite/
CMD ["go-carbon", "-config", "/data/graphite/carbon.conf"]

EXPOSE 2003 2004 7002 7007 2003/udp
VOLUME /data/graphite/
6 changes: 5 additions & 1 deletion Makefile
Expand Up @@ -19,7 +19,7 @@ rpm: tmp/go-carbon.tar.gz
cp deploy/buildrpm.sh tmp/buildrpm.sh
cd tmp && ./buildrpm.sh ../deploy/go-carbon.spec.centos `../go-carbon --version`

deb:
deb:
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -B -us -uc

submodules:
Expand All @@ -31,3 +31,7 @@ test:

clean:
rm -f go-carbon

image:
CGO_ENABLED=0 GOOS=linux $(MAKE) go-carbon
docker build -t go-carbon .
44 changes: 44 additions & 0 deletions conf-examples/carbon.conf
@@ -0,0 +1,44 @@
[common]
user = ""
logfile = ""
log-level = "info"
graph-prefix = "carbon.agents.{host}."
max-cpu = 1
metric-interval = "1m0s"

[whisper]
data-dir = "/data/graphite/whisper/"
schemas-file = "/data/graphite/schemas"
aggregation-file = ""
workers = 1
max-updates-per-second = 0
sparse-create = false
enabled = true

[cache]
max-size = 1000000
input-buffer = 51200

[udp]
listen = ":2003"
enabled = true
log-incomplete = false

[tcp]
listen = ":2003"
enabled = true

[pickle]
listen = ":2004"
max-message-size = 67108864
enabled = true

[carbonlink]
listen = "0.0.0.0:7002"
enabled = true
read-timeout = "30s"
query-timeout = "100ms"

[pprof]
listen = "0.0.0.0:7007"
enabled = false
7 changes: 7 additions & 0 deletions conf-examples/schemas
@@ -0,0 +1,7 @@
[carbon]
pattern = ^carbon\.
retentions = 60:90d

[default_1min_for_1day]
pattern = .*
retentions = 60s:1d

0 comments on commit 28a3393

Please sign in to comment.