-
Notifications
You must be signed in to change notification settings - Fork 17
/
Dockerfile
54 lines (41 loc) · 1.08 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM aheimsbakk/base-alpine:latest
# Thats me
MAINTAINER Arnulf Heimsbakk <[email protected]>
# Install packages
RUN apk add --no-cache \
coreutils \
dumb-init \
findutils \
logrotate \
munin \
nginx \
perl-cgi-fast \
procps \
rrdtool-cached \
spawn-fcgi \
sudo \
ttf-opensans \
tzdata \
;
# Set munin crontab
RUN sed '/^[^*].*$/d; s/ munin //g' /etc/munin/munin.cron.sample | crontab -u munin -
# Log munin-node to stdout
RUN sed -i 's#^log_file.*#log_file /dev/stdout#' /etc/munin/munin-node.conf
# Default nginx.conf
COPY nginx.conf /etc/nginx/
# Copy munin config to nginx
COPY default.conf /etc/nginx/conf.d/
# Copy munin conf
COPY munin.conf /etc/munin/
# Start script with all processes
COPY docker-cmd.sh /
# Logrotate script for munin logs
COPY munin /etc/logrotate.d/
# Expose volumes
VOLUME /etc/munin/munin-conf.d /etc/munin/plugin-conf.d /var/lib/munin /var/log/munin
# Expose nginx
EXPOSE 80
# Use dumb-init since we run a lot of processes
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
# Run start script or what you choose
CMD /docker-cmd.sh