👕 Dockerfile tweaks

This commit is contained in:
Franck Nijhof 2020-07-26 20:28:43 +02:00
parent cb9294a963
commit 9c72d27948
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3

View file

@ -17,11 +17,19 @@ RUN \
&& if [ "${BUILD_ARCH}" = "aarch64" ]; then ARCH="arm64"; fi \ && if [ "${BUILD_ARCH}" = "aarch64" ]; then ARCH="arm64"; fi \
\ \
&& apk update \ && apk update \
&& apk --no-cache add python3 py3-idna py3-certifi py3-chardet py3-yaml py3-urllib3 py3-requests \ && apk --no-cache add \
&& apk --no-cache add --virtual builddeps py-pip \ python3 \
py3-idna \
py3-certifi \
py3-chardet \
py3-yaml \
py3-urllib3 \
py3-requests \
&& apk --no-cache add --virtual .builddeps \
py-pip \
\ \
&& curl -J -L -o /tmp/prometheus.tar.gz \ && curl -J -L -o /tmp/prometheus.tar.gz \
https://github.com/prometheus/prometheus/releases/download/v${PROMETHEUS_VERSION}/prometheus-${PROMETHEUS_VERSION}.linux-${ARCH}.tar.gz \ "https://github.com/prometheus/prometheus/releases/download/v${PROMETHEUS_VERSION}/prometheus-${PROMETHEUS_VERSION}.linux-${ARCH}.tar.gz" \
&& adduser -s /bin/false -D -H prometheus \ && adduser -s /bin/false -D -H prometheus \
&& cd /tmp \ && cd /tmp \
&& tar -xvf /tmp/prometheus.tar.gz \ && tar -xvf /tmp/prometheus.tar.gz \
@ -33,7 +41,7 @@ RUN \
&& 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 -r /opt/prometheus-configgen/requirements.txt \
&& apk del builddeps && apk --no-cache del .builddeps
# Build arguments # Build arguments
ARG BUILD_DATE ARG BUILD_DATE