Update DockerFile

This commit is contained in:
nicolargo 2020-08-20 15:48:38 +02:00
parent d95ec00cf5
commit 70e7c997a1
2 changed files with 17 additions and 17 deletions

View File

@ -8,7 +8,7 @@
FROM alpine
# Install Glances (develop branch)
RUN apk add python py2-psutil py2-bottle
RUN apk add python py3-psutil py3-bottle
RUN apk add git
RUN git clone -b develop https://github.com/nicolargo/glances.git

View File

@ -3,25 +3,25 @@
#
# https://github.com/nicolargo/glances
#
# Thanks to @Overbryd for the Dockerfile
# Source: https://github.com/nicolargo/glances/issues/1419#issuecomment-677644194
#
# Pull base image.
FROM python:2.7-alpine
FROM python:3.8-slim-buster
# Install Glances (develop branch)
RUN apk add --no-cache --virtual .build_deps \
gcc \
musl-dev \
linux-headers \
git \
&& git clone -b develop https://github.com/nicolargo/glances.git \
&& pip install --no-cache-dir -r glances/requirements.txt bottle \
&& apk del .build_deps
RUN apt-get update \
&& apt-get install -y \
gcc \
python3-dev
ARG GLANCES_VERSION=3.1.5
RUN pip install \
glances[web,ip,folders,docker,cpuinfo,action]==${GLANCES_VERSION}
# Define working directory.
WORKDIR /glances
# EXPOSE PORT (For Web UI & XMLRPC)
EXPOSE 61208 61209
# expose xmlrpc & webui
EXPOSE 61209 61208
# Define default command.
CMD python -m glances -C /glances/conf/glances.conf $GLANCES_OPT
CMD python -m glances -C /glances/conf/glances.conf $GLANCES_OPT