47 lines
2.0 KiB
Docker
47 lines
2.0 KiB
Docker
FROM openeuler/openeuler:24.03
|
|
|
|
RUN dnf update -y && \
|
|
dnf install -y supervisor && \
|
|
dnf clean all && \
|
|
rm -rf /var/cache/dnf/*
|
|
|
|
RUN architecture=$(uname -m); \
|
|
if [ "$architecture" = "aarch64" ]; then \
|
|
echo "install ARM64 prometheus"; \
|
|
curl -fsSL --retry 3 https://github.com/prometheus/prometheus/releases/download/v2.54.0/prometheus-2.54.0.linux-arm64.tar.gz | tar -xz -C /usr/local/bin && \
|
|
mv /usr/local/bin/prometheus-*/prometheus /usr/local/bin/prometheus && \
|
|
rm /usr/local/bin/prometheus-* -rf && \
|
|
chmod +x /usr/local/bin/prometheus; \
|
|
elif [ "$architecture" = "x86_64" ]; then \
|
|
echo "install x86_64 prometheus"; \
|
|
curl -fsSL --retry 3 https://github.com/prometheus/prometheus/releases/download/v2.54.0/prometheus-2.54.0.linux-amd64.tar.gz | tar -xz -C /usr/local/bin && \
|
|
mv /usr/local/bin/prometheus-*/prometheus /usr/local/bin/prometheus && \
|
|
rm /usr/local/bin/prometheus-* -rf && \
|
|
chmod +x /usr/local/bin/prometheus; \
|
|
else \
|
|
echo "platform [$architecture] not supported"; \
|
|
exit 1; \
|
|
fi
|
|
|
|
RUN architecture=$(uname -m); \
|
|
if [ "$architecture" = "aarch64" ]; then \
|
|
echo "install ARM64 confd"; \
|
|
curl -fsSL --retry 3 https://github.com/abtreece/confd/releases/download/v0.20.0/confd-v0.20.0-linux-arm64.tar.gz | tar -xz -C /usr/local/bin && \
|
|
chmod +x /usr/local/bin/confd; \
|
|
elif [ "$architecture" = "x86_64" ]; then \
|
|
echo "install x86_64 confd"; \
|
|
curl -fsSL --retry 3 https://github.com/abtreece/confd/releases/download/v0.20.0/confd-v0.20.0-linux-amd64.tar.gz | tar -xz -C /usr/local/bin && \
|
|
chmod +x /usr/local/bin/confd; \
|
|
else \
|
|
echo "platform [$architecture] not supported"; \
|
|
exit 1; \
|
|
fi
|
|
|
|
RUN mkdir /etc/prometheus/
|
|
|
|
COPY prometheus.yml /etc/prometheus/prometheus.yml
|
|
COPY ./confd/ /etc/confd/
|
|
COPY ./supervisord/ /etc/supervisord/
|
|
|
|
CMD [ "supervisord", "-c", "/etc/supervisord/supervisord.conf" ]
|