summaryrefslogtreecommitdiffstats
path: root/docker-files
diff options
context:
space:
mode:
authorMarkus Pöschl <Poeschl@users.noreply.github.com>2021-05-15 14:36:33 +0200
committerMarkus Pöschl <Poeschl@users.noreply.github.com>2021-05-15 15:44:43 +0200
commit44a917a2c6b43e191c3af491c0c150b415fa8a4d (patch)
tree4658ca958a8e7305c3f5d6cf21b4a509f7becf11 /docker-files
parent3ab59b833a4f74cad5bcf0a28b5ae0fe1b04f1e0 (diff)
Move to plain alpine image to build pip dependencies successfully
Diffstat (limited to 'docker-files')
-rw-r--r--docker-files/alpine.Dockerfile16
1 files changed, 11 insertions, 5 deletions
diff --git a/docker-files/alpine.Dockerfile b/docker-files/alpine.Dockerfile
index 311d04de..375d1a6b 100644
--- a/docker-files/alpine.Dockerfile
+++ b/docker-files/alpine.Dockerfile
@@ -4,13 +4,18 @@
# https://github.com/nicolargo/glances
#
-FROM python:3.9-alpine as build
+FROM alpine:3.13 as build
RUN apk add --no-cache \
+ python3 \
python3-dev \
+ py3-pip \
+ py3-wheel \
musl-dev \
linux-headers \
build-base \
+ libzmq \
+ zeromq-dev \
curl \
lm-sensors \
wireless-tools \
@@ -36,7 +41,7 @@ RUN CASS_DRIVER_NO_CYTHON=1 pip3 install --no-cache-dir --user -r optional-requi
FROM build as dev
-COPY --from=additional-packages /root/.local/lib/python3.9/site-packages /usr/lib/python3.9/site-packages/
+COPY --from=additional-packages /root/.local/lib/python3.8/site-packages /usr/lib/python3.8/site-packages/
COPY . /glances
# EXPOSE PORT (XMLRPC / WebUI)
@@ -49,16 +54,17 @@ CMD python3 -m glances -C /glances/conf/glances.conf $GLANCES_OPT
#Create running images without any building dependency
-FROM python:3.9-alpine as minimal
+FROM alpine:3.13 as minimal
RUN apk add --no-cache \
+ python3 \
curl \
lm-sensors \
wireless-tools \
iputils
COPY --from=remoteInstall /root/.local/bin /usr/local/bin/
-COPY --from=remoteInstall /root/.local/lib/python3.9/site-packages /usr/local/lib/python3.9/site-packages/
+COPY --from=remoteInstall /root/.local/lib/python3.8/site-packages /usr/lib/python3.8/site-packages/
# EXPOSE PORT (XMLRPC / WebUI)
EXPOSE 61209 61208
@@ -69,4 +75,4 @@ CMD python3 -m glances -C /glances/conf/glances.conf $GLANCES_OPT
FROM minimal as full
-COPY --from=additional-packages /root/.local/lib/python3.9/site-packages /usr/lib/python3.9/site-packages/
+COPY --from=additional-packages /root/.local/lib/python3.8/site-packages /usr/local/python3.8/site-packages/