mirror of
https://github.com/hassio-addons/addon-prometheus.git
synced 2025-05-05 03:31:25 +00:00
🔨 Reduce resulting image with 68Mb
This commit is contained in:
parent
8b8d96be6e
commit
886c1d16a7
1 changed files with 9 additions and 3 deletions
|
@ -16,7 +16,6 @@ RUN \
|
||||||
ARCH="${BUILD_ARCH}" \
|
ARCH="${BUILD_ARCH}" \
|
||||||
&& if [ "${BUILD_ARCH}" = "aarch64" ]; then ARCH="arm64"; fi \
|
&& if [ "${BUILD_ARCH}" = "aarch64" ]; then ARCH="arm64"; fi \
|
||||||
\
|
\
|
||||||
&& apk update \
|
|
||||||
&& apk --no-cache add \
|
&& apk --no-cache add \
|
||||||
python3 \
|
python3 \
|
||||||
py3-idna \
|
py3-idna \
|
||||||
|
@ -40,8 +39,15 @@ RUN \
|
||||||
&& cp -R prometheus-${PROMETHEUS_VERSION}.linux-${ARCH}/consoles/ /etc/prometheus/ \
|
&& cp -R prometheus-${PROMETHEUS_VERSION}.linux-${ARCH}/consoles/ /etc/prometheus/ \
|
||||||
&& rm -r prometheus-${PROMETHEUS_VERSION}.linux-${ARCH} \
|
&& rm -r prometheus-${PROMETHEUS_VERSION}.linux-${ARCH} \
|
||||||
&& chown -R prometheus:prometheus /etc/prometheus \
|
&& chown -R prometheus:prometheus /etc/prometheus \
|
||||||
&& pip3 install -r /opt/prometheus-configgen/requirements.txt \
|
&& pip3 install \
|
||||||
&& apk --no-cache del .builddeps
|
--no-cache-dir \
|
||||||
|
--prefer-binary \
|
||||||
|
--find-links "https://wheels.home-assistant.io/alpine-3.12/${BUILD_ARCH}/" \
|
||||||
|
-r /opt/prometheus-configgen/requirements.txt \
|
||||||
|
\
|
||||||
|
&& apk --no-cache del .builddeps \
|
||||||
|
&& rm -f -r \
|
||||||
|
/tmp/*
|
||||||
|
|
||||||
# Build arguments
|
# Build arguments
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue