improved and optimized Dockerfile
This commit is contained in:
19
Dockerfile
19
Dockerfile
@@ -1,22 +1,21 @@
|
|||||||
FROM telegraf:latest
|
FROM telegraf:latest
|
||||||
|
|
||||||
# Install required packages
|
# Install required packages
|
||||||
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
|
RUN apt-get update \
|
||||||
|
&& apt-get upgrade -y \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
apt-transport-https \
|
apt-transport-https \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
gnupg-agent \
|
gnupg-agent \
|
||||||
software-properties-common \
|
software-properties-common \
|
||||||
python3-distutils
|
python3-distutils \
|
||||||
|
&& curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
||||||
|
&& python3 get-pip.py --prefix=/usr/local \
|
||||||
|
&& python3 -m pip install requests \
|
||||||
|
&& pip install unidecode \
|
||||||
|
&& rm /entrypoint.sh
|
||||||
|
|
||||||
# Install pip
|
|
||||||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
|
||||||
RUN python3 get-pip.py --prefix=/usr/local
|
|
||||||
|
|
||||||
# Install Python dependencies
|
|
||||||
RUN python3 -m pip install requests
|
|
||||||
RUN pip install unidecode
|
|
||||||
RUN rm /entrypoint.sh
|
|
||||||
ADD --chmod=1755 entrypoint.sh /
|
ADD --chmod=1755 entrypoint.sh /
|
||||||
ADD freebox-monit.py /usr/local/py/
|
ADD freebox-monit.py /usr/local/py/
|
||||||
ADD telegraf.conf /etc/telegraf/
|
ADD telegraf.conf /etc/telegraf/
|
||||||
|
Reference in New Issue
Block a user