containerized-monitoring/Dockerfile
2024-04-24 18:11:05 -04:00

39 lines
1.3 KiB
Docker

FROM ubuntu:latest
# Munin specific
VOLUME /opt/munin
EXPOSE 2813
# 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 && \
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 "**** 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/ /