50 lines
1.5 KiB
Docker
50 lines
1.5 KiB
Docker
FROM ubuntu:latest
|
|
|
|
# Munin
|
|
VOLUME /opt/munin
|
|
EXPOSE 2813
|
|
|
|
# Monit
|
|
VOLUME /opt/monit
|
|
EXPOSE 2812/tcp
|
|
|
|
# Dashboard
|
|
EXPOSE 80
|
|
|
|
# Run s6-overlay as the init so we get services and similar
|
|
ENTRYPOINT [ "/init" ]
|
|
|
|
# Don't bother us for selections during install
|
|
ENV DEBIAN_FRONTEND="noninteractive"
|
|
|
|
# We work off /opt, the *nix way
|
|
WORKDIR /opt/
|
|
|
|
# Install and base setup all the things
|
|
RUN apt update && apt upgrade -y && \
|
|
apt install -y curl jq xz-utils lm-sensors nano && \
|
|
S6_RELEASE=$(curl -sX GET "https://api.github.com/repos/just-containers/s6-overlay/tags" \
|
|
| jq -r .[0].name); \
|
|
echo "**** s6-overlay release: ${S6_RELEASE} ****" && \
|
|
echo "**** Installing s6-overlay ****" && \
|
|
curl -L https://github.com/just-containers/s6-overlay/releases/latest/download/s6-overlay-x86_64.tar.xz \
|
|
-o /opt/s6-overlay-x86_64.tar.xz && \
|
|
curl -L https://github.com/just-containers/s6-overlay/releases/latest/download/s6-overlay-noarch.tar.xz \
|
|
-o /opt/s6-overlay-noarch.tar.xz && \
|
|
tar -C / -Jxpf /opt/s6-overlay-x86_64.tar.xz && \
|
|
tar -C / -Jxpf /opt/s6-overlay-noarch.tar.xz && \
|
|
echo "**** munin related ****" && \
|
|
apt install -y munin lighttpd && \
|
|
echo "**** monit related ***" && \
|
|
apt install -y monit && \
|
|
echo "**** dashboard related ****" && \
|
|
apt install -y lighttpd && \
|
|
echo "**** cleanup ****" && \
|
|
rm /opt/s6-overlay*.tar.xz && \
|
|
apt remove --purge -y jq xz-utils && \
|
|
apt autoremove --purge -y && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy the s6 related 'stuff' to the container
|
|
ADD /root/ /
|