mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-23 20:45:33 +03:00
Migration to Alpine 3.19 and update documentation regarding default glances.conf file in Docker images
This commit is contained in:
parent
07a81c50ff
commit
5cc18adfb4
@ -221,14 +221,16 @@ Run last version of Glances container in *console mode*:
|
|||||||
|
|
||||||
docker run --rm -e TZ="${TZ}" -v /var/run/docker.sock:/var/run/docker.sock:ro -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro --pid host --network host -it nicolargo/glances:latest-full
|
docker run --rm -e TZ="${TZ}" -v /var/run/docker.sock:/var/run/docker.sock:ro -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro --pid host --network host -it nicolargo/glances:latest-full
|
||||||
|
|
||||||
|
By default, the /etc/glances/glances.conf file is used (based on docker-compose/glances.conf).
|
||||||
|
|
||||||
Additionally, if you want to use your own glances.conf file, you can
|
Additionally, if you want to use your own glances.conf file, you can
|
||||||
create your own Dockerfile:
|
create your own Dockerfile:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
FROM nicolargo/glances:latest
|
FROM nicolargo/glances:latest
|
||||||
COPY glances.conf /etc/glances.conf
|
COPY glances.conf /root/.config/glances/glances.conf
|
||||||
CMD python -m glances -C /etc/glances.conf $GLANCES_OPT
|
CMD python -m glances -C /root/.config/glances/glances.conf $GLANCES_OPT
|
||||||
|
|
||||||
Alternatively, you can specify something along the same lines with
|
Alternatively, you can specify something along the same lines with
|
||||||
docker run options (notice the `GLANCES_OPT` environment
|
docker run options (notice the `GLANCES_OPT` environment
|
||||||
@ -236,7 +238,7 @@ variable setting parameters for the glances startup command):
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
docker run -e TZ="${TZ}" -v `pwd`/glances.conf:/etc/glances.conf -v /var/run/docker.sock:/var/run/docker.sock:ro -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro --pid host -e GLANCES_OPT="-C /etc/glances.conf" -it nicolargo/glances:latest-full
|
docker run -e TZ="${TZ}" -v `pwd`/glances.conf:/root/.config/glances/glances.conf -v /var/run/docker.sock:/var/run/docker.sock:ro -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro --pid host -e GLANCES_OPT="-C /etc/glances.conf" -it nicolargo/glances:latest-full
|
||||||
|
|
||||||
Where \`pwd\`/glances.conf is a local directory containing your glances.conf file.
|
Where \`pwd\`/glances.conf is a local directory containing your glances.conf file.
|
||||||
|
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
# WARNING: the Alpine image version and Python version should be set.
|
# WARNING: the Alpine image version and Python version should be set.
|
||||||
# Alpine 3.18 tag is a link to the latest 3.18.x version.
|
# Alpine 3.18 tag is a link to the latest 3.18.x version.
|
||||||
# Be aware that if you change the Alpine version, you may have to change the Python version.
|
# Be aware that if you change the Alpine version, you may have to change the Python version.
|
||||||
ARG IMAGE_VERSION=3.18
|
|
||||||
|
ARG IMAGE_VERSION=3.19
|
||||||
ARG PYTHON_VERSION=3.11
|
ARG PYTHON_VERSION=3.11
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@ -84,7 +85,7 @@ RUN python${PYTHON_VERSION} -m pip install --target="/venv/lib/python${PYTHON_VE
|
|||||||
FROM base as release
|
FROM base as release
|
||||||
|
|
||||||
# Copy source code and config file
|
# Copy source code and config file
|
||||||
COPY ./docker-compose/glances.conf /etc/glances.conf
|
COPY ./docker-compose/glances.conf /etc/glances/glances.conf
|
||||||
COPY /glances /app/glances
|
COPY /glances /app/glances
|
||||||
|
|
||||||
# Copy binary and update PATH
|
# Copy binary and update PATH
|
||||||
|
@ -77,7 +77,7 @@ RUN python${PYTHON_VERSION} -m pip install --target="/venv/lib/python${PYTHON_VE
|
|||||||
FROM base as release
|
FROM base as release
|
||||||
|
|
||||||
# Copy Glances source code and config file
|
# Copy Glances source code and config file
|
||||||
COPY ./docker-compose/glances.conf /etc/glances.conf
|
COPY ./docker-compose/glances.conf /etc/glances/glances.conf
|
||||||
COPY /glances /app/glances
|
COPY /glances /app/glances
|
||||||
|
|
||||||
# Copy binary and update PATH
|
# Copy binary and update PATH
|
||||||
|
Loading…
Reference in New Issue
Block a user