summaryrefslogtreecommitdiffstats
path: root/docker-files
diff options
context:
space:
mode:
Diffstat (limited to 'docker-files')
-rw-r--r--docker-files/Dockerfile34
-rw-r--r--docker-files/dev.Dockerfile39
-rw-r--r--docker-files/devel-alpine/Dockerfile5
-rw-r--r--docker-files/devel-arm/Dockerfile27
-rw-r--r--docker-files/devel/Dockerfile25
-rw-r--r--docker-files/master/Dockerfile43
6 files changed, 75 insertions, 98 deletions
diff --git a/docker-files/Dockerfile b/docker-files/Dockerfile
new file mode 100644
index 00000000..2a169c92
--- /dev/null
+++ b/docker-files/Dockerfile
@@ -0,0 +1,34 @@
+#
+# Glances Dockerfile (based on Ubuntu)
+#
+# https://github.com/nicolargo/glances
+#
+
+ARG ARCH=
+FROM ${ARCH}python:3-slim-buster
+
+# Install package
+# Must used calibre package to be able to run external module
+ENV DEBIAN_FRONTEND noninteractive
+RUN \
+ apt-get update && \
+ apt-get install -y \
+ curl \
+ gcc \
+ lm-sensors \
+ wireless-tools \
+ iputils-ping && \
+ rm -rf /var/lib/apt/lists/*
+
+# Force rebuild otherwise it could be cached without rerun
+ARG VCS_REF
+RUN pip install glances[all]
+
+# Define working directory.
+WORKDIR /glances
+
+# EXPOSE PORT (XMLRPC / WebUI)
+EXPOSE 61209 61208
+
+# Define default command.
+CMD python3 -m glances -C /glances/conf/glances.conf $GLANCES_OPT
diff --git a/docker-files/dev.Dockerfile b/docker-files/dev.Dockerfile
new file mode 100644
index 00000000..9fbf7924
--- /dev/null
+++ b/docker-files/dev.Dockerfile
@@ -0,0 +1,39 @@
+#
+# Glances Dockerfile (based on Ubuntu)
+#
+# https://github.com/nicolargo/glances
+#
+
+ARG ARCH=
+FROM ${ARCH}python:3-buster
+
+# Install package
+# Must used calibre package to be able to run external module
+ENV DEBIAN_FRONTEND noninteractive
+RUN \
+ apt-get update && \
+ apt-get install -y \
+ curl \
+ gcc \
+ git \
+ lm-sensors \
+ wireless-tools \
+ iputils-ping && \
+ rm -rf /var/lib/apt/lists/*
+
+RUN pip install psutil bottle
+
+# Define working directory
+WORKDIR /glances
+
+COPY *requirements.txt .
+
+RUN CASS_DRIVER_NO_CYTHON=1 pip install -r optional-requirements.txt
+
+COPY . /glances
+
+# EXPOSE PORT (XMLRPC / WebUI)
+EXPOSE 61209 61208
+
+# Define default command.
+CMD python3 -m glances -C /glances/conf/glances.conf $GLANCES_OPT
diff --git a/docker-files/devel-alpine/Dockerfile b/docker-files/devel-alpine/Dockerfile
index 57646559..512b9e8f 100644
--- a/docker-files/devel-alpine/Dockerfile
+++ b/docker-files/devel-alpine/Dockerfile
@@ -8,8 +8,7 @@
FROM alpine
# Install Glances (develop branch)
-RUN apk add python py2-psutil py2-bottle
-RUN apk add git
+RUN apk add python3 py3-psutil py3-bottle docker-py git
RUN git clone -b develop https://github.com/nicolargo/glances.git
# Define working directory.
@@ -22,4 +21,4 @@ EXPOSE 61209
EXPOSE 61208
# Define default command.
-CMD python -m glances -C /glances/conf/glances.conf $GLANCES_OPT
+CMD /usr/bin/python3 -m glances -C /glances/conf/glances.conf $GLANCES_OPT
diff --git a/docker-files/devel-arm/Dockerfile b/docker-files/devel-arm/Dockerfile
deleted file mode 100644
index c21ec81b..00000000
--- a/docker-files/devel-arm/Dockerfile
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Glances Dockerfile for ARM (based on Alpine ARM)
-#
-# https://github.com/nicolargo/glances
-#
-
-# Pull base image.
-FROM python:2.7-alpine
-
-# 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
-
-# Define working directory.
-WORKDIR /glances
-
-# EXPOSE PORT (For Web UI & XMLRPC)
-EXPOSE 61208 61209
-
-# Define default command.
-CMD python -m glances -C /glances/conf/glances.conf $GLANCES_OPT
diff --git a/docker-files/devel/Dockerfile b/docker-files/devel/Dockerfile
deleted file mode 100644
index a0d31190..00000000
--- a/docker-files/devel/Dockerfile
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# Glances Dockerfile based on Ubuntu OS
-#
-# https://github.com/nicolargo/glances
-#
-
-# Pull base image.
-FROM ubuntu:20.04
-
-# Install Glances (develop branch)
-RUN apt-get update && apt-get -y install curl iputils-ping && rm -rf /var/lib/apt/lists/*
-RUN curl -L https://raw.githubusercontent.com/nicolargo/glancesautoinstall/master/install-develop.sh | /bin/bash && rm -rf /var/lib/apt/lists/*
-
-
-# Define working directory.
-WORKDIR /glances
-
-# EXPOSE PORT (For XMLRPC)
-EXPOSE 61209
-
-# EXPOSE PORT (For Web UI)
-EXPOSE 61208
-
-# Define default command.
-CMD python -m glances -C /glances/conf/glances.conf $GLANCES_OPT
diff --git a/docker-files/master/Dockerfile b/docker-files/master/Dockerfile
deleted file mode 100644
index b2c874c1..00000000
--- a/docker-files/master/Dockerfile
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# Glances Dockerfile (based on Ubuntu)
-#
-# https://github.com/nicolargo/glances
-#
-
-# Pull base image.
-FROM ubuntu:20.04
-
-
-# Install package
-# Must used calibre package to be able to run external module
-ENV DEBIAN_FRONTEND noninteractive
-RUN \
- apt-get update && \
- apt-get install -y \
- curl \
- gcc \
- lm-sensors \
- wireless-tools \
- iputils-ping \
- python3-pip \
- python3-dev && \
- rm -rf /var/lib/apt/lists/*
-
-## Instal glances
-RUN \
- pip3 install --upgrade pip && \
- pip3 install setuptools \
- glances[action,batinfo,browser,cpuinfo,docker,export,folders,gpu,graph,ip,raid,snmp,web,wifi] \
- glances
-
-# Define working directory.
-WORKDIR /glances
-
-# EXPOSE PORT (For XMLRPC)
-EXPOSE 61209
-
-# EXPOSE PORT (For Web UI)
-EXPOSE 61208
-
-# Define default command.
-CMD python3 -m glances -C /glances/conf/glances.conf $GLANCES_OPT